// Do not edit this file; automatically generated by build.py.
'use strict';


// Copyright 2012 Google Inc.  Apache License 2.0
Blockly.Python=new Blockly.Generator("Python");Blockly.Python.addReservedWords("and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,not,or,pass,print,raise,return,try,while,with,yield,True,False,None,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern");
Blockly.Python.ORDER_ATOMIC=0;Blockly.Python.ORDER_COLLECTION=1;Blockly.Python.ORDER_STRING_CONVERSION=1;Blockly.Python.ORDER_MEMBER=2;Blockly.Python.ORDER_FUNCTION_CALL=2;Blockly.Python.ORDER_EXPONENTIATION=3;Blockly.Python.ORDER_UNARY_SIGN=4;Blockly.Python.ORDER_BITWISE_NOT=4;Blockly.Python.ORDER_MULTIPLICATIVE=5;Blockly.Python.ORDER_ADDITIVE=6;Blockly.Python.ORDER_BITWISE_SHIFT=7;Blockly.Python.ORDER_BITWISE_AND=8;Blockly.Python.ORDER_BITWISE_XOR=9;Blockly.Python.ORDER_BITWISE_OR=10;
Blockly.Python.ORDER_RELATIONAL=11;Blockly.Python.ORDER_LOGICAL_NOT=12;Blockly.Python.ORDER_LOGICAL_AND=13;Blockly.Python.ORDER_LOGICAL_OR=14;Blockly.Python.ORDER_CONDITIONAL=15;Blockly.Python.ORDER_LAMBDA=16;Blockly.Python.ORDER_NONE=99;Blockly.Python.PASS="  pass\n";
Blockly.Python.init=function(a){Blockly.Python.tfAppendCleanupCall_=!1;Blockly.Python.definitions_=Object.create(null);Blockly.Python.functionNames_=Object.create(null);Blockly.Python.variableDB_?Blockly.Python.variableDB_.reset():Blockly.Python.variableDB_=new Blockly.Names(Blockly.Python.RESERVED_WORDS_);var b=[];a=Blockly.Variables.allVariables(a);for(var c=0;c<a.length;c++)b[c]=Blockly.Python.variableDB_.getName(a[c],Blockly.Variables.NAME_TYPE)+" = None";Blockly.Python.definitions_.variables=
b.join("\n")};Blockly.Python.finish=function(a){return{dictVariables:null,definitions:null,implementationTopLevelBlocks:null}};Blockly.Python.scrubNakedValue=function(a){return a+"\n"};Blockly.Python.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/\%/g,"\\%").replace(/'/g,"\\'");return"'"+a+"'"};
Blockly.Python.scrub_=function(a,b){var c="";if(!a.outputConnection||!a.outputConnection.targetConnection){var d=a.getCommentText();d&&(c+=Blockly.Python.prefixLines(d,"# ")+"\n");for(var e=0;e<a.inputList.length;e++)a.inputList[e].type==Blockly.INPUT_VALUE&&(d=a.inputList[e].connection.targetBlock())&&(d=Blockly.Python.allNestedComments(d))&&(c+=Blockly.Python.prefixLines(d,"# "))}e=a.nextConnection&&a.nextConnection.targetBlock();e=Blockly.Python.blockToCode(e);return c+b+e};Blockly.Python.procedures={};
Blockly.Python.procedures_defreturn=function(a){for(var b=Blockly.Variables.allVariables(a),c=b.length-1;0<=c;c--){var d=b[c];-1==a.arguments_.indexOf(d)?b[c]=Blockly.Python.variableDB_.getName(d,Blockly.Variables.NAME_TYPE):b.splice(c,1)}b=b.length?"  global "+b.join(", ")+"\n":"";c=Blockly.Python.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE);d=Blockly.Python.statementToCode(a,"STACK");Blockly.Python.STATEMENT_PREFIX&&(d=Blockly.Python.prefixLines(Blockly.Python.STATEMENT_PREFIX.replace(/%1/g,"'"+
a.id+"'"),Blockly.Python.INDENT)+d);Blockly.Python.INFINITE_LOOP_TRAP&&(d=Blockly.Python.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+d);var e=Blockly.Python.valueToCode(a,"RETURN",Blockly.Python.ORDER_NONE)||"";e?e="  return "+e+"\n":d||(d=Blockly.Python.PASS);for(var f=[],g=0;g<a.arguments_.length;g++)f[g]=Blockly.Python.variableDB_.getName(a.arguments_[g],Blockly.Variables.NAME_TYPE);b="def "+c+"("+f.join(", ")+"):\n"+b+d+e;b=Blockly.Python.scrub_(a,b);Blockly.Python.definitions_[c]=b;return null};
Blockly.Python.procedures_defnoreturn=Blockly.Python.procedures_defreturn;Blockly.Python.procedures_callreturn=function(a){for(var b=Blockly.Python.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=[],d=0;d<a.arguments_.length;d++)c[d]=Blockly.Python.valueToCode(a,"ARG"+d,Blockly.Python.ORDER_NONE)||"None";return[b+"("+c.join(", ")+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.procedures_callnoreturn=function(a){for(var b=Blockly.Python.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=[],d=0;d<a.arguments_.length;d++)c[d]=Blockly.Python.valueToCode(a,"ARG"+d,Blockly.Python.ORDER_NONE)||"None";return b+"("+c.join(", ")+")\n"};
Blockly.Python.procedures_ifreturn=function(a){var b="if "+(Blockly.Python.valueToCode(a,"CONDITION",Blockly.Python.ORDER_NONE)||"False")+":\n";a.hasReturnValue_?(a=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"None",b+="  return "+a+"\n"):b+="  return\n";return b};Blockly.Python.misc={};Blockly.Python.tinkerforge_misc_sleep=function(a){var b=Blockly.Python.valueToCode(a,"_TIME_AMOUNT",Blockly.Python.ORDER_ATOMIC);"TIME_UNIT_MS"===a.getFieldValue("_TIME_UNIT")&&(b/=1E3);Blockly.Python.definitions_.common_python_import_time="import time";return"time.sleep("+String(b)+")\n"};
Blockly.Python.tinkerforge_misc_repeat_with_interval=function(a){var b=Blockly.Python.valueToCode(a,"_REPEAT_INTERVAL_TIME_AMOUNT",Blockly.Python.ORDER_ATOMIC),c=a.getFieldValue("_REPEAT_INTERVAL_TIME_UNIT"),d=Blockly.Python.statementToCode(a,"_REPEAT_INTERVAL_STATEMENTS");"TIME_UNIT_MS"===c&&(b/=1E3);Blockly.Python.definitions_.common_python_import_time="import time";d=d+"  time.sleep("+String(b)+")\n";return"while True:\n"+Blockly.Python.addLoopTrap(d,a.id)||Blockly.Python.PASS};Blockly.Python.loops={};Blockly.Python.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(parseInt(a.getFieldValue("TIMES"),10)):Blockly.Python.valueToCode(a,"TIMES",Blockly.Python.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")",c=Blockly.Python.statementToCode(a,"DO"),c=Blockly.Python.addLoopTrap(c,a.id)||Blockly.Python.PASS;return"for "+Blockly.Python.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE)+" in range("+b+"):\n"+c};
Blockly.Python.controls_repeat=Blockly.Python.controls_repeat_ext;Blockly.Python.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Python.valueToCode(a,"BOOL",b?Blockly.Python.ORDER_LOGICAL_NOT:Blockly.Python.ORDER_NONE)||"False",d=Blockly.Python.statementToCode(a,"DO"),d=Blockly.Python.addLoopTrap(d,a.id)||Blockly.Python.PASS;b&&(c="not "+c);return"while "+c+":\n"+d};
Blockly.Python.controls_for=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0",d=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0",e=Blockly.Python.valueToCode(a,"BY",Blockly.Python.ORDER_NONE)||"1",f=Blockly.Python.statementToCode(a,"DO"),f=Blockly.Python.addLoopTrap(f,a.id)||Blockly.Python.PASS,g="",h=function(){return Blockly.Python.provideFunction_("upRange",
["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):","  while start <= stop:","    yield start","    start += abs(step)"])},k=function(){return Blockly.Python.provideFunction_("downRange",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):","  while start >= stop:","    yield start","    start -= abs(step)"])};a=function(a,b,c){return"("+a+" <= "+b+") and "+h()+"("+a+", "+b+", "+c+") or "+k()+"("+a+", "+b+", "+c+")"};if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&
Blockly.isNumber(e))c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),0===c%1&&0===d%1&&0===e%1?(c<=d?(d++,a=0==c&&1==e?d:c+", "+d,1!=e&&(a+=", "+e)):(d--,a=c+", "+d+", -"+e),a="range("+a+")"):(a=c<d?h():k(),a+="("+c+", "+d+", "+e+")");else{var l=function(a,c){if(Blockly.isNumber(a))a=parseFloat(a);else if(a.match(/^\w+$/))a="float("+a+")";else{var d=Blockly.Python.variableDB_.getDistinctName(b+c,Blockly.Variables.NAME_TYPE);g+=d+" = float("+a+")\n";a=d}return a},c=l(c,"_start"),d=l(d,"_end");
l(e,"_inc");a="number"==typeof c&&"number"==typeof d?c<d?h(c,d,e):k(c,d,e):a(c,d,e)}return g+="for "+b+" in "+a+":\n"+f};Blockly.Python.controls_forEach=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Python.valueToCode(a,"LIST",Blockly.Python.ORDER_RELATIONAL)||"[]",d=Blockly.Python.statementToCode(a,"DO"),d=Blockly.Python.addLoopTrap(d,a.id)||Blockly.Python.PASS;return"for "+b+" in "+c+":\n"+d};
Blockly.Python.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break\n";case "CONTINUE":return"continue\n"}throw"Unknown flow statement.";};Blockly.Python.texts={};Blockly.Python.text=function(a){return[Blockly.Python.quote_(a.getFieldValue("TEXT")),Blockly.Python.ORDER_ATOMIC]};
Blockly.Python.text_join=function(a){var b;if(0==a.itemCount_)return["''",Blockly.Python.ORDER_ATOMIC];if(1==a.itemCount_)return b=Blockly.Python.valueToCode(a,"ADD0",Blockly.Python.ORDER_NONE)||"''",["str("+b+")",Blockly.Python.ORDER_FUNCTION_CALL];if(2==a.itemCount_)return b=Blockly.Python.valueToCode(a,"ADD0",Blockly.Python.ORDER_NONE)||"''",a=Blockly.Python.valueToCode(a,"ADD1",Blockly.Python.ORDER_NONE)||"''",["str("+b+") + str("+a+")",Blockly.Python.ORDER_UNARY_SIGN];b=[];for(var c=0;c<a.itemCount_;c++)b[c]=
Blockly.Python.valueToCode(a,"ADD"+c,Blockly.Python.ORDER_NONE)||"''";a=Blockly.Python.variableDB_.getDistinctName("temp_value",Blockly.Variables.NAME_TYPE);b="''.join([str("+a+") for "+a+" in ["+b.join(", ")+"]])";return[b,Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.text_append=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);a=Blockly.Python.valueToCode(a,"TEXT",Blockly.Python.ORDER_NONE)||"''";return b+" = str("+b+") + str("+a+")\n"};
Blockly.Python.text_length=function(a){return["len("+(Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"''")+")",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.text_isEmpty=function(a){return["not len("+(Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"''")+")",Blockly.Python.ORDER_LOGICAL_NOT]};
Blockly.Python.text_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"find":"rfind",c=Blockly.Python.valueToCode(a,"FIND",Blockly.Python.ORDER_NONE)||"''";return[(Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_MEMBER)||"''")+"."+b+"("+c+") + 1",Blockly.Python.ORDER_MEMBER]};
Blockly.Python.text_charAt=function(a){var b=a.getFieldValue("WHERE")||"FROM_START",c=Blockly.Python.valueToCode(a,"AT",Blockly.Python.ORDER_UNARY_SIGN)||"1";a=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_MEMBER)||"''";switch(b){case "FIRST":return[a+"[0]",Blockly.Python.ORDER_MEMBER];case "LAST":return[a+"[-1]",Blockly.Python.ORDER_MEMBER];case "FROM_START":return c=Blockly.isNumber(c)?parseInt(c,10)-1:"int("+c+" - 1)",[a+"["+c+"]",Blockly.Python.ORDER_MEMBER];case "FROM_END":return[a+
"[-"+c+"]",Blockly.Python.ORDER_MEMBER];case "RANDOM":return Blockly.Python.definitions_.import_random="import random",[Blockly.Python.provideFunction_("text_random_letter",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(text):","  x = int(random.random() * len(text))","  return text[x];"])+"("+a+")",Blockly.Python.ORDER_FUNCTION_CALL]}throw"Unhandled option (text_charAt).";};
Blockly.Python.text_getSubstring=function(a){var b=Blockly.Python.valueToCode(a,"STRING",Blockly.Python.ORDER_MEMBER)||"''",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Python.valueToCode(a,"AT1",Blockly.Python.ORDER_ADDITIVE)||"1";a=Blockly.Python.valueToCode(a,"AT2",Blockly.Python.ORDER_ADDITIVE)||"1";"FIRST"==c||"FROM_START"==c&&"1"==e?e="":"FROM_START"==c?e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)":"FROM_END"==c&&(e=Blockly.isNumber(e)?-parseInt(e,10):"-int("+
e+")");"LAST"==d||"FROM_END"==d&&"1"==a?a="":"FROM_START"==c?a=Blockly.isNumber(a)?parseInt(a,10):"int("+a+")":"FROM_END"==c&&(Blockly.isNumber(a)?(a=1-parseInt(a,10),0==a&&(a="")):(Blockly.Python.definitions_.import_sys="import sys",a="int(1 - "+a+") or sys.maxsize"));return[b+"["+e+" : "+a+"]",Blockly.Python.ORDER_MEMBER]};
Blockly.Python.text_changeCase=function(a){var b={UPPERCASE:".upper()",LOWERCASE:".lower()",TITLECASE:".title()"}[a.getFieldValue("CASE")];return[(Blockly.Python.valueToCode(a,"TEXT",Blockly.Python.ORDER_MEMBER)||"''")+b,Blockly.Python.ORDER_MEMBER]};Blockly.Python.text_trim=function(a){var b={LEFT:".lstrip()",RIGHT:".rstrip()",BOTH:".strip()"}[a.getFieldValue("MODE")];return[(Blockly.Python.valueToCode(a,"TEXT",Blockly.Python.ORDER_MEMBER)||"''")+b,Blockly.Python.ORDER_MEMBER]};
Blockly.Python.text_print=function(a){return"print("+(Blockly.Python.valueToCode(a,"TEXT",Blockly.Python.ORDER_NONE)||"''")+")\n"};
Blockly.Python.text_prompt_ext=function(a){var b=Blockly.Python.provideFunction_("text_prompt",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(msg):","  try:","    return raw_input(msg)","  except NameError:","    return input(msg)"]),c=a.getField("TEXT")?Blockly.Python.quote_(a.getFieldValue("TEXT")):Blockly.Python.valueToCode(a,"TEXT",Blockly.Python.ORDER_NONE)||"''",b=b+"("+c+")";"NUMBER"==a.getFieldValue("TYPE")&&(b="float("+b+")");return[b,Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.text_prompt=Blockly.Python.text_prompt_ext;Blockly.Python.logic={};
Blockly.Python.controls_if=function(a){for(var b=0,c=Blockly.Python.valueToCode(a,"IF"+b,Blockly.Python.ORDER_NONE)||"False",d=Blockly.Python.statementToCode(a,"DO"+b)||Blockly.Python.PASS,e="if "+c+":\n"+d,b=1;b<=a.elseifCount_;b++)c=Blockly.Python.valueToCode(a,"IF"+b,Blockly.Python.ORDER_NONE)||"False",d=Blockly.Python.statementToCode(a,"DO"+b)||Blockly.Python.PASS,e+="elif "+c+":\n"+d;a.elseCount_&&(d=Blockly.Python.statementToCode(a,"ELSE")||Blockly.Python.PASS,e+="else:\n"+d);return e};
Blockly.Python.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Python.ORDER_RELATIONAL,d=Blockly.Python.valueToCode(a,"A",c)||"0";a=Blockly.Python.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]};
Blockly.Python.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"and":"or",c="and"==b?Blockly.Python.ORDER_LOGICAL_AND:Blockly.Python.ORDER_LOGICAL_OR,d=Blockly.Python.valueToCode(a,"A",c);a=Blockly.Python.valueToCode(a,"B",c);if(d||a){var e="and"==b?"True":"False";d||(d=e);a||(a=e)}else a=d="False";return[d+" "+b+" "+a,c]};Blockly.Python.logic_negate=function(a){return["not "+(Blockly.Python.valueToCode(a,"BOOL",Blockly.Python.ORDER_LOGICAL_NOT)||"True"),Blockly.Python.ORDER_LOGICAL_NOT]};
Blockly.Python.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"True":"False",Blockly.Python.ORDER_ATOMIC]};Blockly.Python.logic_null=function(a){return["None",Blockly.Python.ORDER_ATOMIC]};
Blockly.Python.logic_ternary=function(a){var b=Blockly.Python.valueToCode(a,"IF",Blockly.Python.ORDER_CONDITIONAL)||"False",c=Blockly.Python.valueToCode(a,"THEN",Blockly.Python.ORDER_CONDITIONAL)||"None";a=Blockly.Python.valueToCode(a,"ELSE",Blockly.Python.ORDER_CONDITIONAL)||"None";return[c+" if "+b+" else "+a,Blockly.Python.ORDER_CONDITIONAL]};Blockly.Python.variables={};Blockly.Python.variables_get=function(a){return[Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),Blockly.Python.ORDER_ATOMIC]};Blockly.Python.variables_set=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0";return Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE)+" = "+b+"\n"};Blockly.Python.math={};Blockly.Python.addReservedWords("math,random,Number");Blockly.Python.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));var b;Infinity==a?(a='float("inf")',b=Blockly.Python.ORDER_FUNCTION_CALL):-Infinity==a?(a='-float("inf")',b=Blockly.Python.ORDER_UNARY_SIGN):b=0>a?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC;return[a,b]};
Blockly.Python.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Python.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Python.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Python.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Python.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Python.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Python.valueToCode(a,"A",b)||"0";a=Blockly.Python.valueToCode(a,"B",b)||"0";return[d+c+a,b]};
Blockly.Python.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Python.ORDER_UNARY_SIGN];Blockly.Python.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_MULTIPLICATIVE)||"0":Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_NONE)||"0";switch(b){case "ABS":c="math.fabs("+a+")";break;case "ROOT":c="math.sqrt("+
a+")";break;case "LN":c="math.log("+a+")";break;case "LOG10":c="math.log10("+a+")";break;case "EXP":c="math.exp("+a+")";break;case "POW10":c="math.pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="math.ceil("+a+")";break;case "ROUNDDOWN":c="math.floor("+a+")";break;case "SIN":c="math.sin("+a+" / 180.0 * math.pi)";break;case "COS":c="math.cos("+a+" / 180.0 * math.pi)";break;case "TAN":c="math.tan("+a+" / 180.0 * math.pi)"}if(c)return[c,Blockly.Python.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c=
"math.asin("+a+") / math.pi * 180";break;case "ACOS":c="math.acos("+a+") / math.pi * 180";break;case "ATAN":c="math.atan("+a+") / math.pi * 180";break;default:throw"Unknown math operator: "+b;}return[c,Blockly.Python.ORDER_MULTIPLICATIVE]};
Blockly.Python.math_constant=function(a){var b={PI:["math.pi",Blockly.Python.ORDER_MEMBER],E:["math.e",Blockly.Python.ORDER_MEMBER],GOLDEN_RATIO:["(1 + math.sqrt(5)) / 2",Blockly.Python.ORDER_MULTIPLICATIVE],SQRT2:["math.sqrt(2)",Blockly.Python.ORDER_MEMBER],SQRT1_2:["math.sqrt(1.0 / 2)",Blockly.Python.ORDER_MEMBER],INFINITY:["float('inf')",Blockly.Python.ORDER_ATOMIC]};a=a.getFieldValue("CONSTANT");"INFINITY"!=a&&(Blockly.Python.definitions_.import_math="import math");return b[a]};
Blockly.Python.math_number_property=function(a){var b=Blockly.Python.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Python.ORDER_MULTIPLICATIVE)||"0",c=a.getFieldValue("PROPERTY"),d;if("PRIME"==c)return Blockly.Python.definitions_.import_math="import math",Blockly.Python.definitions_.from_numbers_import_Number="from numbers import Number",[Blockly.Python.provideFunction_("math_isPrime",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(n):","  # https://en.wikipedia.org/wiki/Primality_test#Naive_methods",
"  # If n is not a number but a string, try parsing it.","  if not isinstance(n, Number):","    try:","      n = float(n)","    except:","      return False","  if n == 2 or n == 3:","    return True","  # False if n is negative, is 1, or not whole, or if n is divisible by 2 or 3.","  if n <= 1 or n % 1 != 0 or n % 2 == 0 or n % 3 == 0:","    return False","  # Check all the numbers of form 6k +/- 1, up to sqrt(n).","  for x in range(6, int(math.sqrt(n)) + 2, 6):","    if n % (x - 1) == 0 or n % (x + 1) == 0:",
"      return False","  return True"])+"("+b+")",Blockly.Python.ORDER_FUNCTION_CALL];switch(c){case "EVEN":d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d=b+" % 1 == 0";break;case "POSITIVE":d=b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=Blockly.Python.valueToCode(a,"DIVISOR",Blockly.Python.ORDER_MULTIPLICATIVE);if(!a||"0"==a)return["False",Blockly.Python.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Python.ORDER_RELATIONAL]};
Blockly.Python.math_change=function(a){Blockly.Python.definitions_.from_numbers_import_Number="from numbers import Number";var b=Blockly.Python.valueToCode(a,"DELTA",Blockly.Python.ORDER_ADDITIVE)||"0";a=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = ("+a+" if isinstance("+a+", Number) else 0) + "+b+"\n"};Blockly.Python.math_round=Blockly.Python.math_single;Blockly.Python.math_trig=Blockly.Python.math_single;
Blockly.Python.math_on_list=function(a){var b=a.getFieldValue("OP");a=Blockly.Python.valueToCode(a,"LIST",Blockly.Python.ORDER_NONE)||"[]";switch(b){case "SUM":b="sum("+a+")";break;case "MIN":b="min("+a+")";break;case "MAX":b="max("+a+")";break;case "AVERAGE":Blockly.Python.definitions_.from_numbers_import_Number="from numbers import Number";b=Blockly.Python.provideFunction_("math_mean",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(myList):","  localList = [e for e in myList if isinstance(e, Number)]",
"  if not localList: return","  return float(sum(localList)) / len(localList)"]);b=b+"("+a+")";break;case "MEDIAN":Blockly.Python.definitions_.from_numbers_import_Number="from numbers import Number";b=Blockly.Python.provideFunction_("math_median",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(myList):","  localList = sorted([e for e in myList if isinstance(e, Number)])","  if not localList: return","  if len(localList) % 2 == 0:","    return (localList[len(localList) // 2 - 1] + localList[len(localList) // 2]) / 2.0",
"  else:","    return localList[(len(localList) - 1) // 2]"]);b=b+"("+a+")";break;case "MODE":b=Blockly.Python.provideFunction_("math_modes",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(some_list):","  modes = []","  # Using a lists of [item, count] to keep count rather than dict",'  # to avoid "unhashable" errors when the counted item is itself a list or dict.',"  counts = []","  maxCount = 1","  for item in some_list:","    found = False","    for count in counts:","      if count[0] == item:",
"        count[1] += 1","        maxCount = max(maxCount, count[1])","        found = True","    if not found:","      counts.append([item, 1])","  for counted_item, item_count in counts:","    if item_count == maxCount:","      modes.append(counted_item)","  return modes"]);b=b+"("+a+")";break;case "STD_DEV":Blockly.Python.definitions_.import_math="import math";b=Blockly.Python.provideFunction_("math_standard_deviation",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(numbers):","  n = len(numbers)",
"  if n == 0: return","  mean = float(sum(numbers)) / n","  variance = sum((x - mean) ** 2 for x in numbers) / n","  return math.sqrt(variance)"]);b=b+"("+a+")";break;case "RANDOM":Blockly.Python.definitions_.import_random="import random";b="random.choice("+a+")";break;default:throw"Unknown operator: "+b;}return[b,Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.math_modulo=function(a){var b=Blockly.Python.valueToCode(a,"DIVIDEND",Blockly.Python.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Python.valueToCode(a,"DIVISOR",Blockly.Python.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Python.ORDER_MULTIPLICATIVE]};
Blockly.Python.math_constrain=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0",c=Blockly.Python.valueToCode(a,"LOW",Blockly.Python.ORDER_NONE)||"0";a=Blockly.Python.valueToCode(a,"HIGH",Blockly.Python.ORDER_NONE)||"float('inf')";return["min(max("+b+", "+c+"), "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.math_random_int=function(a){Blockly.Python.definitions_.import_random="import random";var b=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0";a=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0";return["random.randint("+b+", "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.math_random_float=function(a){Blockly.Python.definitions_.import_random="import random";return["random.random()",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.tinkerforge={};
Blockly.Python.brick_dc_set_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VELOCITY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_set_velocity="def _brick_dc_set_velocity(host, port_ip, uid, velocity):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).set_velocity(velocity)";return"_brick_dc_set_velocity("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_dc_get_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_velocity="def _brick_dc_get_velocity(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_velocity()";return["_brick_dc_get_velocity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_get_current_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_current_velocity="def _brick_dc_get_current_velocity(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_current_velocity()";return["_brick_dc_get_current_velocity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_set_acceleration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"ACCELERATION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_set_acceleration="def _brick_dc_set_acceleration(host, port_ip, uid, acceleration):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).set_acceleration(acceleration)";return"_brick_dc_set_acceleration("+String(c)+", "+String(d)+", "+String(b)+", "+
String(a)+")\n"};
Blockly.Python.brick_dc_get_acceleration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc=
"from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_acceleration="def _brick_dc_get_acceleration(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_acceleration()";return["_brick_dc_get_acceleration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_set_pwm_frequency=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"FREQUENCY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_set_pwm_frequency="def _brick_dc_set_pwm_frequency(host, port_ip, uid, frequency):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).set_pwm_frequency(frequency)";return"_brick_dc_set_pwm_frequency("+String(c)+", "+String(d)+", "+String(b)+", "+
String(a)+")\n"};
Blockly.Python.brick_dc_get_pwm_frequency=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc=
"from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_pwm_frequency="def _brick_dc_get_pwm_frequency(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_pwm_frequency()";return["_brick_dc_get_pwm_frequency("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_full_brake=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_full_brake="def _brick_dc_full_brake(host, port_ip, uid):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).full_brake()";return"_brick_dc_full_brake("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_dc_get_stack_input_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_stack_input_voltage="def _brick_dc_get_stack_input_voltage(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_stack_input_voltage()";return["_brick_dc_get_stack_input_voltage("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_get_external_input_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_external_input_voltage="def _brick_dc_get_external_input_voltage(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_external_input_voltage()";return["_brick_dc_get_external_input_voltage("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_get_current_consumption=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_current_consumption="def _brick_dc_get_current_consumption(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_current_consumption()";return["_brick_dc_get_current_consumption("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_enable=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_enable="def _brick_dc_enable(host, port_ip, uid):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).enable()";return"_brick_dc_enable("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_dc_disable=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_disable="def _brick_dc_disable(host, port_ip, uid):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).disable()";return"_brick_dc_disable("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_dc_is_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_is_enabled="def _brick_dc_is_enabled(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).is_enabled()";return["_brick_dc_is_enabled("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_set_drive_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("MODE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_set_drive_mode="def _brick_dc_set_drive_mode(host, port_ip, uid, mode):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).set_drive_mode(mode)";return"_brick_dc_set_drive_mode("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_dc_get_drive_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_drive_mode="def _brick_dc_get_drive_mode(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_drive_mode()";return["_brick_dc_get_drive_mode("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_enable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_enable_status_led="def _brick_dc_enable_status_led(host, port_ip, uid):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).enable_status_led()";return"_brick_dc_enable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_dc_disable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_disable_status_led="def _brick_dc_disable_status_led(host, port_ip, uid):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).disable_status_led()";return"_brick_dc_disable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_dc_is_status_led_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_is_status_led_enabled="def _brick_dc_is_status_led_enabled(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).is_status_led_enabled()";return["_brick_dc_is_status_led_enabled("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_get_protocol1_bricklet_name=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_protocol1_bricklet_name="def _brick_dc_get_protocol1_bricklet_name(host, port_ip, uid, port):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_protocol1_bricklet_name(port)";return["_brick_dc_get_protocol1_bricklet_name("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_get_chip_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_chip_temperature="def _brick_dc_get_chip_temperature(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_chip_temperature()";return["_brick_dc_get_chip_temperature("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_dc_reset=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_reset="def _brick_dc_reset(host, port_ip, uid):\n  _get_device(BrickDC, uid, _get_ipcon(host, port)).reset()";return"_brick_dc_reset("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_dc_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_dc="from tinkerforge.brick_dc import BrickDC";Blockly.Python.definitions_.brick_dc_get_identity="def _brick_dc_get_identity(host, port_ip, uid):\n  return _get_device(BrickDC, uid, _get_ipcon(host, port)).get_identity()";return["_brick_dc_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_acceleration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_acceleration="def _brick_imu_get_acceleration(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_acceleration()";return["_brick_imu_get_acceleration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_magnetic_field=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_magnetic_field="def _brick_imu_get_magnetic_field(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_magnetic_field()";return["_brick_imu_get_magnetic_field("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_angular_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_angular_velocity="def _brick_imu_get_angular_velocity(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_angular_velocity()";return["_brick_imu_get_angular_velocity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_all_data=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_all_data="def _brick_imu_get_all_data(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_all_data()";return["_brick_imu_get_all_data("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_orientation=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_orientation="def _brick_imu_get_orientation(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_orientation()";return["_brick_imu_get_orientation("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_quaternion=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_quaternion="def _brick_imu_get_quaternion(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_quaternion()";return["_brick_imu_get_quaternion("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_imu_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_imu_temperature="def _brick_imu_get_imu_temperature(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_imu_temperature()";return["_brick_imu_get_imu_temperature("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_leds_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_leds_on="def _brick_imu_leds_on(host, port_ip, uid):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).leds_on()";return"_brick_imu_leds_on("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_leds_off=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_leds_off="def _brick_imu_leds_off(host, port_ip, uid):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).leds_off()";return"_brick_imu_leds_off("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_are_leds_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_are_leds_on="def _brick_imu_are_leds_on(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).are_leds_on()";return["_brick_imu_are_leds_on("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_set_acceleration_range=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"RANGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_set_acceleration_range="def _brick_imu_set_acceleration_range(host, port_ip, uid, range):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).set_acceleration_range(range)";return"_brick_imu_set_acceleration_range("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_imu_get_acceleration_range=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_acceleration_range="def _brick_imu_get_acceleration_range(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_acceleration_range()";return["_brick_imu_get_acceleration_range("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_set_magnetometer_range=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"RANGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_set_magnetometer_range="def _brick_imu_set_magnetometer_range(host, port_ip, uid, range):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).set_magnetometer_range(range)";return"_brick_imu_set_magnetometer_range("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_imu_get_magnetometer_range=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_magnetometer_range="def _brick_imu_get_magnetometer_range(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_magnetometer_range()";return["_brick_imu_get_magnetometer_range("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_set_convergence_speed=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SPEED",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_set_convergence_speed="def _brick_imu_set_convergence_speed(host, port_ip, uid, speed):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).set_convergence_speed(speed)";return"_brick_imu_set_convergence_speed("+String(c)+", "+String(d)+", "+
String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_imu_get_convergence_speed=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_convergence_speed="def _brick_imu_get_convergence_speed(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_convergence_speed()";return["_brick_imu_get_convergence_speed("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_set_calibration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"DATA",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("TYP");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_set_calibration="def _brick_imu_set_calibration(host, port_ip, uid, typ, data):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).set_calibration(typ, data)";return"_brick_imu_set_calibration("+String(c)+", "+String(d)+", "+String(b)+", "+
String(a)+", "+String(e)+")\n"};
Blockly.Python.brick_imu_get_calibration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("TYP");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_calibration="def _brick_imu_get_calibration(host, port_ip, uid, typ):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_calibration(typ)";return["_brick_imu_get_calibration("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+
")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_orientation_calculation_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_orientation_calculation_on="def _brick_imu_orientation_calculation_on(host, port_ip, uid):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).orientation_calculation_on()";return"_brick_imu_orientation_calculation_on("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_orientation_calculation_off=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_orientation_calculation_off="def _brick_imu_orientation_calculation_off(host, port_ip, uid):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).orientation_calculation_off()";return"_brick_imu_orientation_calculation_off("+c+", "+a+", "+b+
")\n"};
Blockly.Python.brick_imu_is_orientation_calculation_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu=
"from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_is_orientation_calculation_on="def _brick_imu_is_orientation_calculation_on(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).is_orientation_calculation_on()";return["_brick_imu_is_orientation_calculation_on("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_enable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_enable_status_led="def _brick_imu_enable_status_led(host, port_ip, uid):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).enable_status_led()";return"_brick_imu_enable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_disable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_disable_status_led="def _brick_imu_disable_status_led(host, port_ip, uid):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).disable_status_led()";return"_brick_imu_disable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_is_status_led_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_is_status_led_enabled="def _brick_imu_is_status_led_enabled(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).is_status_led_enabled()";return["_brick_imu_is_status_led_enabled("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_protocol1_bricklet_name=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_protocol1_bricklet_name="def _brick_imu_get_protocol1_bricklet_name(host, port_ip, uid, port):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_protocol1_bricklet_name(port)";return["_brick_imu_get_protocol1_bricklet_name("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_get_chip_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_chip_temperature="def _brick_imu_get_chip_temperature(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_chip_temperature()";return["_brick_imu_get_chip_temperature("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_reset=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_reset="def _brick_imu_reset(host, port_ip, uid):\n  _get_device(BrickIMU, uid, _get_ipcon(host, port)).reset()";return"_brick_imu_reset("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu="from tinkerforge.brick_imu import BrickIMU";Blockly.Python.definitions_.brick_imu_get_identity="def _brick_imu_get_identity(host, port_ip, uid):\n  return _get_device(BrickIMU, uid, _get_ipcon(host, port)).get_identity()";return["_brick_imu_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_acceleration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_acceleration="def _brick_imu_v2_get_acceleration(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_acceleration()";return["_brick_imu_v2_get_acceleration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_magnetic_field=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_magnetic_field="def _brick_imu_v2_get_magnetic_field(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_magnetic_field()";return["_brick_imu_v2_get_magnetic_field("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_angular_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_angular_velocity="def _brick_imu_v2_get_angular_velocity(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_angular_velocity()";return["_brick_imu_v2_get_angular_velocity("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_temperature="def _brick_imu_v2_get_temperature(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_temperature()";return["_brick_imu_v2_get_temperature("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_orientation=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_orientation="def _brick_imu_v2_get_orientation(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_orientation()";return["_brick_imu_v2_get_orientation("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_linear_acceleration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_linear_acceleration="def _brick_imu_v2_get_linear_acceleration(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_linear_acceleration()";return["_brick_imu_v2_get_linear_acceleration("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_gravity_vector=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_gravity_vector="def _brick_imu_v2_get_gravity_vector(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_gravity_vector()";return["_brick_imu_v2_get_gravity_vector("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_quaternion=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_quaternion="def _brick_imu_v2_get_quaternion(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_quaternion()";return["_brick_imu_v2_get_quaternion("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_all_data=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_all_data="def _brick_imu_v2_get_all_data(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_all_data()";return["_brick_imu_v2_get_all_data("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_leds_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_leds_on="def _brick_imu_v2_leds_on(host, port_ip, uid):\n  _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).leds_on()";return"_brick_imu_v2_leds_on("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_v2_leds_off=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_leds_off="def _brick_imu_v2_leds_off(host, port_ip, uid):\n  _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).leds_off()";return"_brick_imu_v2_leds_off("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_v2_are_leds_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_are_leds_on="def _brick_imu_v2_are_leds_on(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).are_leds_on()";return["_brick_imu_v2_are_leds_on("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_save_calibration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_save_calibration="def _brick_imu_v2_save_calibration(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).save_calibration()";return["_brick_imu_v2_save_calibration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_enable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_enable_status_led="def _brick_imu_v2_enable_status_led(host, port_ip, uid):\n  _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).enable_status_led()";return"_brick_imu_v2_enable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_v2_disable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_disable_status_led="def _brick_imu_v2_disable_status_led(host, port_ip, uid):\n  _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).disable_status_led()";return"_brick_imu_v2_disable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_v2_is_status_led_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_is_status_led_enabled="def _brick_imu_v2_is_status_led_enabled(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).is_status_led_enabled()";return["_brick_imu_v2_is_status_led_enabled("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_protocol1_bricklet_name=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_protocol1_bricklet_name="def _brick_imu_v2_get_protocol1_bricklet_name(host, port_ip, uid, port):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_protocol1_bricklet_name(port)";return["_brick_imu_v2_get_protocol1_bricklet_name("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_get_chip_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_chip_temperature="def _brick_imu_v2_get_chip_temperature(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_chip_temperature()";return["_brick_imu_v2_get_chip_temperature("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_imu_v2_reset=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2=
"from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_reset="def _brick_imu_v2_reset(host, port_ip, uid):\n  _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).reset()";return"_brick_imu_v2_reset("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_imu_v2_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_imu_v2="from tinkerforge.brick_imu_v2 import BrickIMUV2";Blockly.Python.definitions_.brick_imu_v2_get_identity="def _brick_imu_v2_get_identity(host, port_ip, uid):\n  return _get_device(BrickIMUV2, uid, _get_ipcon(host, port)).get_identity()";return["_brick_imu_v2_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_stack_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_stack_voltage="def _brick_master_get_stack_voltage(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_stack_voltage()";return["_brick_master_get_stack_voltage("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_stack_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_stack_current="def _brick_master_get_stack_current(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_stack_current()";return["_brick_master_get_stack_current("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_extension_type=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"EXTENSION",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("EXTTYPE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_extension_type="def _brick_master_set_extension_type(host, port_ip, uid, extension, exttype):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_extension_type(extension, exttype)";return"_brick_master_set_extension_type("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_extension_type=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"EXTENSION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_extension_type="def _brick_master_get_extension_type(host, port_ip, uid, extension):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_extension_type(extension)";return["_brick_master_get_extension_type("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_is_chibi_present=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_is_chibi_present="def _brick_master_is_chibi_present(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).is_chibi_present()";return["_brick_master_is_chibi_present("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_chibi_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"ADDRESS",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_chibi_address="def _brick_master_set_chibi_address(host, port_ip, uid, address):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_chibi_address(address)";return"_brick_master_set_chibi_address("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_chibi_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_chibi_address="def _brick_master_get_chibi_address(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_chibi_address()";return["_brick_master_get_chibi_address("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_chibi_master_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"ADDRESS",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_chibi_master_address="def _brick_master_set_chibi_master_address(host, port_ip, uid, address):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_chibi_master_address(address)";return"_brick_master_set_chibi_master_address("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_chibi_master_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_chibi_master_address="def _brick_master_get_chibi_master_address(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_chibi_master_address()";return["_brick_master_get_chibi_master_address("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_chibi_slave_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"ADDRESS",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_chibi_slave_address="def _brick_master_set_chibi_slave_address(host, port_ip, uid, num, address):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_chibi_slave_address(num, address)";return"_brick_master_set_chibi_slave_address("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_chibi_slave_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_chibi_slave_address="def _brick_master_get_chibi_slave_address(host, port_ip, uid, num):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_chibi_slave_address(num)";return["_brick_master_get_chibi_slave_address("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_chibi_signal_strength=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_chibi_signal_strength="def _brick_master_get_chibi_signal_strength(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_chibi_signal_strength()";return["_brick_master_get_chibi_signal_strength("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_chibi_error_log=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_chibi_error_log="def _brick_master_get_chibi_error_log(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_chibi_error_log()";return["_brick_master_get_chibi_error_log("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_chibi_frequency=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("FREQUENCY");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_chibi_frequency="def _brick_master_set_chibi_frequency(host, port_ip, uid, frequency):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_chibi_frequency(frequency)";return"_brick_master_set_chibi_frequency("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_chibi_frequency=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_chibi_frequency="def _brick_master_get_chibi_frequency(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_chibi_frequency()";return["_brick_master_get_chibi_frequency("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_chibi_channel=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"CHANNEL",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_chibi_channel="def _brick_master_set_chibi_channel(host, port_ip, uid, channel):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_chibi_channel(channel)";return"_brick_master_set_chibi_channel("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_chibi_channel=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_chibi_channel="def _brick_master_get_chibi_channel(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_chibi_channel()";return["_brick_master_get_chibi_channel("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_is_rs485_present=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_is_rs485_present="def _brick_master_is_rs485_present(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).is_rs485_present()";return["_brick_master_is_rs485_present("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_rs485_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"ADDRESS",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_rs485_address="def _brick_master_set_rs485_address(host, port_ip, uid, address):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_rs485_address(address)";return"_brick_master_set_rs485_address("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_rs485_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_rs485_address="def _brick_master_get_rs485_address(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_rs485_address()";return["_brick_master_get_rs485_address("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_rs485_slave_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"ADDRESS",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_rs485_slave_address="def _brick_master_set_rs485_slave_address(host, port_ip, uid, num, address):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_rs485_slave_address(num, address)";return"_brick_master_set_rs485_slave_address("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_rs485_slave_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_rs485_slave_address="def _brick_master_get_rs485_slave_address(host, port_ip, uid, num):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_rs485_slave_address(num)";return["_brick_master_get_rs485_slave_address("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_rs485_error_log=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_rs485_error_log="def _brick_master_get_rs485_error_log(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_rs485_error_log()";return["_brick_master_get_rs485_error_log("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_rs485_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SPEED",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"STOPBITS",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("PARITY");
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_rs485_configuration="def _brick_master_set_rs485_configuration(host, port_ip, uid, speed, parity, stopbits):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_rs485_configuration(speed, parity, stopbits)";return"_brick_master_set_rs485_configuration("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+", "+String(f)+")\n"};
Blockly.Python.brick_master_get_rs485_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_rs485_configuration="def _brick_master_get_rs485_configuration(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_rs485_configuration()";return["_brick_master_get_rs485_configuration("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_is_wifi_present=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_is_wifi_present="def _brick_master_is_wifi_present(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).is_wifi_present()";return["_brick_master_is_wifi_present("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"SSID",Blockly.JavaScript.ORDER_ATOMIC)),f=Blockly.JavaScript.valueToCode(a,"IP",Blockly.JavaScript.ORDER_ATOMIC),g=Blockly.JavaScript.valueToCode(a,
"SUBNET_MASK",Blockly.JavaScript.ORDER_ATOMIC),h=Blockly.JavaScript.valueToCode(a,"GATEWAY",Blockly.JavaScript.ORDER_ATOMIC),k=Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("CONNECTION");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master=
"from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi_configuration="def _brick_master_set_wifi_configuration(host, port_ip, uid, ssid, connection, ip, subnet_mask, gateway, port):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi_configuration(ssid, connection, ip, subnet_mask, gateway, port)";return"_brick_master_set_wifi_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+", "+String(f)+", "+String(g)+
", "+String(h)+", "+String(k)+")\n"};
Blockly.Python.brick_master_get_wifi_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_configuration="def _brick_master_get_wifi_configuration(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_configuration()";return["_brick_master_get_wifi_configuration("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi_encryption=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"KEY",Blockly.JavaScript.ORDER_ATOMIC)),f=Blockly.JavaScript.valueToCode(a,"KEY_INDEX",Blockly.JavaScript.ORDER_ATOMIC),
g=Blockly.JavaScript.valueToCode(a,"CA_CERTIFICATE_LENGTH",Blockly.JavaScript.ORDER_ATOMIC),h=Blockly.JavaScript.valueToCode(a,"CLIENT_CERTIFICATE_LENGTH",Blockly.JavaScript.ORDER_ATOMIC),k=Blockly.JavaScript.valueToCode(a,"PRIVATE_KEY_LENGTH",Blockly.JavaScript.ORDER_ATOMIC),l=a.getFieldValue("ENCRYPTION");a=a.getFieldValue("EAP_OPTIONS");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi_encryption="def _brick_master_set_wifi_encryption(host, port_ip, uid, encryption, key, key_index, eap_options, ca_certificate_length, client_certificate_length, private_key_length):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi_encryption(encryption, key, key_index, eap_options, ca_certificate_length, client_certificate_length, private_key_length)";
return"_brick_master_set_wifi_encryption("+String(c)+", "+String(d)+", "+String(b)+", "+String(l)+", "+String(e)+", "+String(f)+", "+String(a)+", "+String(g)+", "+String(h)+", "+String(k)+")\n"};
Blockly.Python.brick_master_get_wifi_encryption=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_encryption="def _brick_master_get_wifi_encryption(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_encryption()";return["_brick_master_get_wifi_encryption("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_wifi_status=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_status="def _brick_master_get_wifi_status(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_status()";return["_brick_master_get_wifi_status("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_refresh_wifi_status=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_refresh_wifi_status="def _brick_master_refresh_wifi_status(host, port_ip, uid):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).refresh_wifi_status()";return"_brick_master_refresh_wifi_status("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_master_set_wifi_certificate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"INDEX",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"DATA",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,
"DATA_LENGTH",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";
Blockly.Python.definitions_.brick_master_set_wifi_certificate="def _brick_master_set_wifi_certificate(host, port_ip, uid, index, data, data_length):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi_certificate(index, data, data_length)";return"_brick_master_set_wifi_certificate("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi_certificate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"INDEX",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_certificate="def _brick_master_get_wifi_certificate(host, port_ip, uid, index):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_certificate(index)";return["_brick_master_get_wifi_certificate("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi_power_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("MODE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi_power_mode="def _brick_master_set_wifi_power_mode(host, port_ip, uid, mode):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi_power_mode(mode)";return"_brick_master_set_wifi_power_mode("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi_power_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_power_mode="def _brick_master_get_wifi_power_mode(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_power_mode()";return["_brick_master_get_wifi_power_mode("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_wifi_buffer_info=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_buffer_info="def _brick_master_get_wifi_buffer_info(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_buffer_info()";return["_brick_master_get_wifi_buffer_info("+c+", "+a+", "+b+
")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi_regulatory_domain=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("DOMAIN");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi_regulatory_domain="def _brick_master_set_wifi_regulatory_domain(host, port_ip, uid, domain):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi_regulatory_domain(domain)";return"_brick_master_set_wifi_regulatory_domain("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi_regulatory_domain=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_regulatory_domain="def _brick_master_get_wifi_regulatory_domain(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_regulatory_domain()";return["_brick_master_get_wifi_regulatory_domain("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_usb_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_usb_voltage="def _brick_master_get_usb_voltage(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_usb_voltage()";return["_brick_master_get_usb_voltage("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_long_wifi_key=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"KEY",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_long_wifi_key="def _brick_master_set_long_wifi_key(host, port_ip, uid, key):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_long_wifi_key(key)";return"_brick_master_set_long_wifi_key("+String(c)+", "+String(d)+", "+
String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_long_wifi_key=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master=
"from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_long_wifi_key="def _brick_master_get_long_wifi_key(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_long_wifi_key()";return["_brick_master_get_long_wifi_key("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi_hostname=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"HOSTNAME",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi_hostname="def _brick_master_set_wifi_hostname(host, port_ip, uid, hostname):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi_hostname(hostname)";return"_brick_master_set_wifi_hostname("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi_hostname=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_hostname="def _brick_master_get_wifi_hostname(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_hostname()";return["_brick_master_get_wifi_hostname("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_is_ethernet_present=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_is_ethernet_present="def _brick_master_is_ethernet_present(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).is_ethernet_present()";return["_brick_master_is_ethernet_present("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_ethernet_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"IP",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"SUBNET_MASK",Blockly.JavaScript.ORDER_ATOMIC),g=Blockly.JavaScript.valueToCode(a,
"GATEWAY",Blockly.JavaScript.ORDER_ATOMIC),h=Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("CONNECTION");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master=
"from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_ethernet_configuration="def _brick_master_set_ethernet_configuration(host, port_ip, uid, connection, ip, subnet_mask, gateway, port):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_ethernet_configuration(connection, ip, subnet_mask, gateway, port)";return"_brick_master_set_ethernet_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+", "+String(e)+", "+String(f)+", "+String(g)+
", "+String(h)+")\n"};
Blockly.Python.brick_master_get_ethernet_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master=
"from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_ethernet_configuration="def _brick_master_get_ethernet_configuration(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_ethernet_configuration()";return["_brick_master_get_ethernet_configuration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_ethernet_status=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_ethernet_status="def _brick_master_get_ethernet_status(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_ethernet_status()";return["_brick_master_get_ethernet_status("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_ethernet_hostname=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"HOSTNAME",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_ethernet_hostname="def _brick_master_set_ethernet_hostname(host, port_ip, uid, hostname):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_ethernet_hostname(hostname)";return"_brick_master_set_ethernet_hostname("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_set_ethernet_mac_address=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"MAC_ADDRESS",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_ethernet_mac_address="def _brick_master_set_ethernet_mac_address(host, port_ip, uid, mac_address):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_ethernet_mac_address(mac_address)";return"_brick_master_set_ethernet_mac_address("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_set_ethernet_websocket_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SOCKETS",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC);
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_ethernet_websocket_configuration="def _brick_master_set_ethernet_websocket_configuration(host, port_ip, uid, sockets, port):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_ethernet_websocket_configuration(sockets, port)";
return"_brick_master_set_ethernet_websocket_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_ethernet_websocket_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_ethernet_websocket_configuration="def _brick_master_get_ethernet_websocket_configuration(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_ethernet_websocket_configuration()";return["_brick_master_get_ethernet_websocket_configuration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_ethernet_authentication_secret=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"SECRET",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_ethernet_authentication_secret="def _brick_master_set_ethernet_authentication_secret(host, port_ip, uid, secret):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_ethernet_authentication_secret(secret)";return"_brick_master_set_ethernet_authentication_secret("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_ethernet_authentication_secret=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_ethernet_authentication_secret="def _brick_master_get_ethernet_authentication_secret(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_ethernet_authentication_secret()";return["_brick_master_get_ethernet_authentication_secret("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi_authentication_secret=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"SECRET",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi_authentication_secret="def _brick_master_set_wifi_authentication_secret(host, port_ip, uid, secret):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi_authentication_secret(secret)";return"_brick_master_set_wifi_authentication_secret("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi_authentication_secret=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi_authentication_secret="def _brick_master_get_wifi_authentication_secret(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi_authentication_secret()";return["_brick_master_get_wifi_authentication_secret("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_connection_type=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_connection_type="def _brick_master_get_connection_type(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_connection_type()";return["_brick_master_get_connection_type("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_is_wifi2_present=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_is_wifi2_present="def _brick_master_is_wifi2_present(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).is_wifi2_present()";return["_brick_master_is_wifi2_present("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_start_wifi2_bootloader=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_start_wifi2_bootloader="def _brick_master_start_wifi2_bootloader(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).start_wifi2_bootloader()";return["_brick_master_start_wifi2_bootloader("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_write_wifi2_flash=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"DATA",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"LENGTH",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_write_wifi2_flash="def _brick_master_write_wifi2_flash(host, port_ip, uid, data, length):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).write_wifi2_flash(data, length)";return["_brick_master_write_wifi2_flash("+String(c)+
", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_read_wifi2_flash=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"LENGTH_IN",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_read_wifi2_flash="def _brick_master_read_wifi2_flash(host, port_ip, uid, length_in):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).read_wifi2_flash(length_in)";return["_brick_master_read_wifi2_flash("+String(c)+", "+
String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi2_authentication_secret=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"SECRET",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi2_authentication_secret="def _brick_master_set_wifi2_authentication_secret(host, port_ip, uid, secret):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi2_authentication_secret(secret)";return"_brick_master_set_wifi2_authentication_secret("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi2_authentication_secret=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_authentication_secret="def _brick_master_get_wifi2_authentication_secret(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_authentication_secret()";return["_brick_master_get_wifi2_authentication_secret("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi2_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"WEBSOCKET_PORT",Blockly.JavaScript.ORDER_ATOMIC),g=Blockly.JavaScript.valueToCode(a,
"WEBSITE_PORT",Blockly.JavaScript.ORDER_ATOMIC),h=Blockly.JavaScript.valueToCode(a,"PHY_MODE",Blockly.JavaScript.ORDER_ATOMIC),k=Blockly.JavaScript.valueToCode(a,"SLEEP_MODE",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"WEBSITE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master=
"from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi2_configuration="def _brick_master_set_wifi2_configuration(host, port_ip, uid, port, websocket_port, website_port, phy_mode, sleep_mode, website):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi2_configuration(port, websocket_port, website_port, phy_mode, sleep_mode, website)";return"_brick_master_set_wifi2_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+
String(f)+", "+String(g)+", "+String(h)+", "+String(k)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi2_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_configuration="def _brick_master_get_wifi2_configuration(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_configuration()";return["_brick_master_get_wifi2_configuration("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_wifi2_status=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_status="def _brick_master_get_wifi2_status(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_status()";return["_brick_master_get_wifi2_status("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi2_client_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"SSID",Blockly.JavaScript.ORDER_ATOMIC)),f=Blockly.JavaScript.valueToCode(a,"IP",Blockly.JavaScript.ORDER_ATOMIC),
g=Blockly.JavaScript.valueToCode(a,"SUBNET_MASK",Blockly.JavaScript.ORDER_ATOMIC),h=Blockly.JavaScript.valueToCode(a,"GATEWAY",Blockly.JavaScript.ORDER_ATOMIC),k=Blockly.JavaScript.valueToCode(a,"MAC_ADDRESS",Blockly.JavaScript.ORDER_ATOMIC),l=Blockly.JavaScript.valueToCode(a,"BSSID",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("ENABLE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi2_client_configuration="def _brick_master_set_wifi2_client_configuration(host, port_ip, uid, enable, ssid, ip, subnet_mask, gateway, mac_address, bssid):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi2_client_configuration(enable, ssid, ip, subnet_mask, gateway, mac_address, bssid)";
return"_brick_master_set_wifi2_client_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(h)+", "+String(k)+", "+String(l)+")\n"};
Blockly.Python.brick_master_get_wifi2_client_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_client_configuration="def _brick_master_get_wifi2_client_configuration(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_client_configuration()";return["_brick_master_get_wifi2_client_configuration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi2_client_hostname=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"HOSTNAME",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi2_client_hostname="def _brick_master_set_wifi2_client_hostname(host, port_ip, uid, hostname):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi2_client_hostname(hostname)";return"_brick_master_set_wifi2_client_hostname("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi2_client_hostname=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_client_hostname="def _brick_master_get_wifi2_client_hostname(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_client_hostname()";return["_brick_master_get_wifi2_client_hostname("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi2_client_password=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PASSWORD",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi2_client_password="def _brick_master_set_wifi2_client_password(host, port_ip, uid, password):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi2_client_password(password)";return"_brick_master_set_wifi2_client_password("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi2_client_password=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_client_password="def _brick_master_get_wifi2_client_password(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_client_password()";return["_brick_master_get_wifi2_client_password("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi2_ap_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"SSID",Blockly.JavaScript.ORDER_ATOMIC)),f=Blockly.JavaScript.valueToCode(a,"IP",Blockly.JavaScript.ORDER_ATOMIC),
g=Blockly.JavaScript.valueToCode(a,"SUBNET_MASK",Blockly.JavaScript.ORDER_ATOMIC),h=Blockly.JavaScript.valueToCode(a,"GATEWAY",Blockly.JavaScript.ORDER_ATOMIC),k=Blockly.JavaScript.valueToCode(a,"AUTH",Blockly.JavaScript.ORDER_ATOMIC),l=Blockly.JavaScript.valueToCode(a,"CHANNEL",Blockly.JavaScript.ORDER_ATOMIC),m=Blockly.JavaScript.valueToCode(a,"MAC_ADDRESS",Blockly.JavaScript.ORDER_ATOMIC),n=a.getFieldValue("ENABLE");a=a.getFieldValue("HIDDEN");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi2_ap_configuration="def _brick_master_set_wifi2_ap_configuration(host, port_ip, uid, enable, ssid, ip, subnet_mask, gateway, auth, hidden, channel, mac_address):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi2_ap_configuration(enable, ssid, ip, subnet_mask, gateway, auth, hidden, channel, mac_address)";
return"_brick_master_set_wifi2_ap_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(n)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(h)+", "+String(k)+", "+String(a)+", "+String(l)+", "+String(m)+")\n"};
Blockly.Python.brick_master_get_wifi2_ap_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_ap_configuration="def _brick_master_get_wifi2_ap_configuration(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_ap_configuration()";return["_brick_master_get_wifi2_ap_configuration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_set_wifi2_ap_password=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PASSWORD",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_set_wifi2_ap_password="def _brick_master_set_wifi2_ap_password(host, port_ip, uid, password):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).set_wifi2_ap_password(password)";return"_brick_master_set_wifi2_ap_password("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_master_get_wifi2_ap_password=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_ap_password="def _brick_master_get_wifi2_ap_password(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_ap_password()";return["_brick_master_get_wifi2_ap_password("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_save_wifi2_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_save_wifi2_configuration="def _brick_master_save_wifi2_configuration(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).save_wifi2_configuration()";return["_brick_master_save_wifi2_configuration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_wifi2_firmware_version=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_wifi2_firmware_version="def _brick_master_get_wifi2_firmware_version(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_wifi2_firmware_version()";return["_brick_master_get_wifi2_firmware_version("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_enable_wifi2_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_enable_wifi2_status_led="def _brick_master_enable_wifi2_status_led(host, port_ip, uid):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).enable_wifi2_status_led()";return"_brick_master_enable_wifi2_status_led("+c+", "+a+", "+
b+")\n"};
Blockly.Python.brick_master_disable_wifi2_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master=
"from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_disable_wifi2_status_led="def _brick_master_disable_wifi2_status_led(host, port_ip, uid):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).disable_wifi2_status_led()";return"_brick_master_disable_wifi2_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_master_is_wifi2_status_led_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_is_wifi2_status_led_enabled="def _brick_master_is_wifi2_status_led_enabled(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).is_wifi2_status_led_enabled()";return["_brick_master_is_wifi2_status_led_enabled("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_enable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_enable_status_led="def _brick_master_enable_status_led(host, port_ip, uid):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).enable_status_led()";return"_brick_master_enable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_master_disable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_disable_status_led="def _brick_master_disable_status_led(host, port_ip, uid):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).disable_status_led()";return"_brick_master_disable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_master_is_status_led_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_is_status_led_enabled="def _brick_master_is_status_led_enabled(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).is_status_led_enabled()";return["_brick_master_is_status_led_enabled("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_protocol1_bricklet_name=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_protocol1_bricklet_name="def _brick_master_get_protocol1_bricklet_name(host, port_ip, uid, port):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_protocol1_bricklet_name(port)";return["_brick_master_get_protocol1_bricklet_name("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_get_chip_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_chip_temperature="def _brick_master_get_chip_temperature(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_chip_temperature()";return["_brick_master_get_chip_temperature("+c+", "+a+", "+b+
")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_master_reset=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master=
"from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_reset="def _brick_master_reset(host, port_ip, uid):\n  _get_device(BrickMaster, uid, _get_ipcon(host, port)).reset()";return"_brick_master_reset("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_master_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_master="from tinkerforge.brick_master import BrickMaster";Blockly.Python.definitions_.brick_master_get_identity="def _brick_master_get_identity(host, port_ip, uid):\n  return _get_device(BrickMaster, uid, _get_ipcon(host, port)).get_identity()";return["_brick_master_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_enable=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_enable="def _brick_servo_enable(host, port_ip, uid, servo_num):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).enable(servo_num)";return"_brick_servo_enable("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_disable=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_disable="def _brick_servo_disable(host, port_ip, uid, servo_num):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).disable(servo_num)";return"_brick_servo_disable("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_is_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_is_enabled="def _brick_servo_is_enabled(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).is_enabled(servo_num)";return["_brick_servo_is_enabled("+String(c)+", "+String(d)+", "+String(b)+", "+
String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_set_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_set_position="def _brick_servo_set_position(host, port_ip, uid, servo_num, position):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).set_position(servo_num, position)";return"_brick_servo_set_position("+String(c)+", "+String(d)+
", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_get_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_position="def _brick_servo_get_position(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_position(servo_num)";return["_brick_servo_get_position("+String(c)+", "+String(d)+", "+String(b)+
", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_get_current_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_current_position="def _brick_servo_get_current_position(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_current_position(servo_num)";return["_brick_servo_get_current_position("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_set_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"VELOCITY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_set_velocity="def _brick_servo_set_velocity(host, port_ip, uid, servo_num, velocity):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).set_velocity(servo_num, velocity)";return"_brick_servo_set_velocity("+String(c)+", "+String(d)+
", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_get_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_velocity="def _brick_servo_get_velocity(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_velocity(servo_num)";return["_brick_servo_get_velocity("+String(c)+", "+String(d)+", "+String(b)+
", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_get_current_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_current_velocity="def _brick_servo_get_current_velocity(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_current_velocity(servo_num)";return["_brick_servo_get_current_velocity("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_set_acceleration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"ACCELERATION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_set_acceleration="def _brick_servo_set_acceleration(host, port_ip, uid, servo_num, acceleration):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).set_acceleration(servo_num, acceleration)";return"_brick_servo_set_acceleration("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_get_acceleration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_acceleration="def _brick_servo_get_acceleration(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_acceleration(servo_num)";return["_brick_servo_get_acceleration("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_set_output_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VOLTAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_set_output_voltage="def _brick_servo_set_output_voltage(host, port_ip, uid, voltage):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).set_output_voltage(voltage)";return"_brick_servo_set_output_voltage("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_get_output_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_output_voltage="def _brick_servo_get_output_voltage(host, port_ip, uid):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_output_voltage()";return["_brick_servo_get_output_voltage("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_set_pulse_width=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"MIN",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,
"MAX",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";
Blockly.Python.definitions_.brick_servo_set_pulse_width="def _brick_servo_set_pulse_width(host, port_ip, uid, servo_num, min, max):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).set_pulse_width(servo_num, min, max)";return"_brick_servo_set_pulse_width("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_get_pulse_width=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_pulse_width="def _brick_servo_get_pulse_width(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_pulse_width(servo_num)";return["_brick_servo_get_pulse_width("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_set_degree=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"MIN",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,
"MAX",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";
Blockly.Python.definitions_.brick_servo_set_degree="def _brick_servo_set_degree(host, port_ip, uid, servo_num, min, max):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).set_degree(servo_num, min, max)";return"_brick_servo_set_degree("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_get_degree=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_degree="def _brick_servo_get_degree(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_degree(servo_num)";return["_brick_servo_get_degree("+String(c)+", "+String(d)+", "+String(b)+", "+
String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_set_period=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"PERIOD",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_set_period="def _brick_servo_set_period(host, port_ip, uid, servo_num, period):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).set_period(servo_num, period)";return"_brick_servo_set_period("+String(c)+", "+String(d)+", "+String(b)+
", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_servo_get_period=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_period="def _brick_servo_get_period(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_period(servo_num)";return["_brick_servo_get_period("+String(c)+", "+String(d)+", "+String(b)+", "+
String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_get_servo_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SERVO_NUM",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_servo_current="def _brick_servo_get_servo_current(host, port_ip, uid, servo_num):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_servo_current(servo_num)";return["_brick_servo_get_servo_current("+String(c)+", "+
String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_get_overall_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_overall_current="def _brick_servo_get_overall_current(host, port_ip, uid):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_overall_current()";return["_brick_servo_get_overall_current("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_get_stack_input_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_stack_input_voltage="def _brick_servo_get_stack_input_voltage(host, port_ip, uid):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_stack_input_voltage()";return["_brick_servo_get_stack_input_voltage("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_get_external_input_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_external_input_voltage="def _brick_servo_get_external_input_voltage(host, port_ip, uid):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_external_input_voltage()";return["_brick_servo_get_external_input_voltage("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_enable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_enable_status_led="def _brick_servo_enable_status_led(host, port_ip, uid):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).enable_status_led()";return"_brick_servo_enable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_servo_disable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_disable_status_led="def _brick_servo_disable_status_led(host, port_ip, uid):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).disable_status_led()";return"_brick_servo_disable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_servo_is_status_led_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_is_status_led_enabled="def _brick_servo_is_status_led_enabled(host, port_ip, uid):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).is_status_led_enabled()";return["_brick_servo_is_status_led_enabled("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_get_protocol1_bricklet_name=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_protocol1_bricklet_name="def _brick_servo_get_protocol1_bricklet_name(host, port_ip, uid, port):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_protocol1_bricklet_name(port)";return["_brick_servo_get_protocol1_bricklet_name("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_get_chip_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_chip_temperature="def _brick_servo_get_chip_temperature(host, port_ip, uid):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_chip_temperature()";return["_brick_servo_get_chip_temperature("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_servo_reset=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_reset="def _brick_servo_reset(host, port_ip, uid):\n  _get_device(BrickServo, uid, _get_ipcon(host, port)).reset()";return"_brick_servo_reset("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_servo_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_servo="from tinkerforge.brick_servo import BrickServo";Blockly.Python.definitions_.brick_servo_get_identity="def _brick_servo_get_identity(host, port_ip, uid):\n  return _get_device(BrickServo, uid, _get_ipcon(host, port)).get_identity()";return["_brick_servo_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_max_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VELOCITY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_max_velocity="def _brick_stepper_set_max_velocity(host, port_ip, uid, velocity):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_max_velocity(velocity)";return"_brick_stepper_set_max_velocity("+String(c)+", "+
String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_stepper_get_max_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_max_velocity="def _brick_stepper_get_max_velocity(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_max_velocity()";return["_brick_stepper_get_max_velocity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_get_current_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_current_velocity="def _brick_stepper_get_current_velocity(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_current_velocity()";return["_brick_stepper_get_current_velocity("+c+", "+a+
", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_speed_ramping=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"ACCELERATION",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"DEACCELERATION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_speed_ramping="def _brick_stepper_set_speed_ramping(host, port_ip, uid, acceleration, deacceleration):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_speed_ramping(acceleration, deacceleration)";return"_brick_stepper_set_speed_ramping("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.brick_stepper_get_speed_ramping=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_speed_ramping="def _brick_stepper_get_speed_ramping(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_speed_ramping()";return["_brick_stepper_get_speed_ramping("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_full_brake=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper=
"from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_full_brake="def _brick_stepper_full_brake(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).full_brake()";return"_brick_stepper_full_brake("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_set_current_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_current_position="def _brick_stepper_set_current_position(host, port_ip, uid, position):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_current_position(position)";return"_brick_stepper_set_current_position("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_stepper_get_current_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_current_position="def _brick_stepper_get_current_position(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_current_position()";return["_brick_stepper_get_current_position("+c+", "+a+
", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_target_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_target_position="def _brick_stepper_set_target_position(host, port_ip, uid, position):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_target_position(position)";return"_brick_stepper_set_target_position("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_stepper_get_target_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_target_position="def _brick_stepper_get_target_position(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_target_position()";return["_brick_stepper_get_target_position("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_steps=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"STEPS",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_steps="def _brick_stepper_set_steps(host, port_ip, uid, steps):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_steps(steps)";return"_brick_stepper_set_steps("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+
")\n"};
Blockly.Python.brick_stepper_get_steps=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper=
"from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_steps="def _brick_stepper_get_steps(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_steps()";return["_brick_stepper_get_steps("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_get_remaining_steps=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_remaining_steps="def _brick_stepper_get_remaining_steps(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_remaining_steps()";return["_brick_stepper_get_remaining_steps("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_step_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("MODE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_step_mode="def _brick_stepper_set_step_mode(host, port_ip, uid, mode):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_step_mode(mode)";return"_brick_stepper_set_step_mode("+String(c)+", "+String(d)+", "+String(b)+
", "+String(a)+")\n"};
Blockly.Python.brick_stepper_get_step_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper=
"from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_step_mode="def _brick_stepper_get_step_mode(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_step_mode()";return["_brick_stepper_get_step_mode("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_drive_forward=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_drive_forward="def _brick_stepper_drive_forward(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).drive_forward()";return"_brick_stepper_drive_forward("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_drive_backward=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_drive_backward="def _brick_stepper_drive_backward(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).drive_backward()";return"_brick_stepper_drive_backward("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_stop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_stop="def _brick_stepper_stop(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).stop()";return"_brick_stepper_stop("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_get_stack_input_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_stack_input_voltage="def _brick_stepper_get_stack_input_voltage(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_stack_input_voltage()";return["_brick_stepper_get_stack_input_voltage("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_get_external_input_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_external_input_voltage="def _brick_stepper_get_external_input_voltage(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_external_input_voltage()";return["_brick_stepper_get_external_input_voltage("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_get_current_consumption=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_current_consumption="def _brick_stepper_get_current_consumption(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_current_consumption()";return["_brick_stepper_get_current_consumption("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_motor_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"CURRENT",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_motor_current="def _brick_stepper_set_motor_current(host, port_ip, uid, current):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_motor_current(current)";return"_brick_stepper_set_motor_current("+String(c)+", "+
String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_stepper_get_motor_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_motor_current="def _brick_stepper_get_motor_current(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_motor_current()";return["_brick_stepper_get_motor_current("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_enable=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper=
"from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_enable="def _brick_stepper_enable(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).enable()";return"_brick_stepper_enable("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_disable=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_disable="def _brick_stepper_disable(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).disable()";return"_brick_stepper_disable("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_is_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_is_enabled="def _brick_stepper_is_enabled(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).is_enabled()";return["_brick_stepper_is_enabled("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_decay=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"DECAY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_decay="def _brick_stepper_set_decay(host, port_ip, uid, decay):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_decay(decay)";return"_brick_stepper_set_decay("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+
")\n"};
Blockly.Python.brick_stepper_get_decay=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper=
"from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_decay="def _brick_stepper_get_decay(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_decay()";return["_brick_stepper_get_decay("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_sync_rect=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("SYNC_RECT");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_sync_rect="def _brick_stepper_set_sync_rect(host, port_ip, uid, sync_rect):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_sync_rect(sync_rect)";return"_brick_stepper_set_sync_rect("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_stepper_is_sync_rect=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_is_sync_rect="def _brick_stepper_is_sync_rect(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).is_sync_rect()";return["_brick_stepper_is_sync_rect("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_set_time_base=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"TIME_BASE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_set_time_base="def _brick_stepper_set_time_base(host, port_ip, uid, time_base):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).set_time_base(time_base)";return"_brick_stepper_set_time_base("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.brick_stepper_get_time_base=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_time_base="def _brick_stepper_get_time_base(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_time_base()";return["_brick_stepper_get_time_base("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_get_all_data=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_all_data="def _brick_stepper_get_all_data(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_all_data()";return["_brick_stepper_get_all_data("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_enable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_enable_status_led="def _brick_stepper_enable_status_led(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).enable_status_led()";return"_brick_stepper_enable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_disable_status_led=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_disable_status_led="def _brick_stepper_disable_status_led(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).disable_status_led()";return"_brick_stepper_disable_status_led("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_is_status_led_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_is_status_led_enabled="def _brick_stepper_is_status_led_enabled(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).is_status_led_enabled()";return["_brick_stepper_is_status_led_enabled("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_get_protocol1_bricklet_name=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_protocol1_bricklet_name="def _brick_stepper_get_protocol1_bricklet_name(host, port_ip, uid, port):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_protocol1_bricklet_name(port)";return["_brick_stepper_get_protocol1_bricklet_name("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_get_chip_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_chip_temperature="def _brick_stepper_get_chip_temperature(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_chip_temperature()";return["_brick_stepper_get_chip_temperature("+c+", "+a+
", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.brick_stepper_reset=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_reset="def _brick_stepper_reset(host, port_ip, uid):\n  _get_device(BrickStepper, uid, _get_ipcon(host, port)).reset()";return"_brick_stepper_reset("+c+", "+a+", "+b+")\n"};
Blockly.Python.brick_stepper_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_brick_stepper="from tinkerforge.brick_stepper import BrickStepper";Blockly.Python.definitions_.brick_stepper_get_identity="def _brick_stepper_get_identity(host, port_ip, uid):\n  return _get_device(BrickStepper, uid, _get_ipcon(host, port)).get_identity()";return["_brick_stepper_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_accelerometer_get_acceleration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_accelerometer="from tinkerforge.bricklet_accelerometer import BrickletAccelerometer";Blockly.Python.definitions_.bricklet_accelerometer_get_acceleration="def _bricklet_accelerometer_get_acceleration(host, port_ip, uid):\n  return _get_device(BrickletAccelerometer, uid, _get_ipcon(host, port)).get_acceleration()";return["_bricklet_accelerometer_get_acceleration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_accelerometer_get_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_accelerometer="from tinkerforge.bricklet_accelerometer import BrickletAccelerometer";Blockly.Python.definitions_.bricklet_accelerometer_get_temperature="def _bricklet_accelerometer_get_temperature(host, port_ip, uid):\n  return _get_device(BrickletAccelerometer, uid, _get_ipcon(host, port)).get_temperature()";return["_bricklet_accelerometer_get_temperature("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_accelerometer_set_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("DATA_RATE"),f=a.getFieldValue("FULL_SCALE");a=a.getFieldValue("FILTER_BANDWIDTH");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_accelerometer="from tinkerforge.bricklet_accelerometer import BrickletAccelerometer";Blockly.Python.definitions_.bricklet_accelerometer_set_configuration="def _bricklet_accelerometer_set_configuration(host, port_ip, uid, data_rate, full_scale, filter_bandwidth):\n  _get_device(BrickletAccelerometer, uid, _get_ipcon(host, port)).set_configuration(data_rate, full_scale, filter_bandwidth)";
return"_bricklet_accelerometer_set_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_accelerometer_get_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_accelerometer="from tinkerforge.bricklet_accelerometer import BrickletAccelerometer";Blockly.Python.definitions_.bricklet_accelerometer_get_configuration="def _bricklet_accelerometer_get_configuration(host, port_ip, uid):\n  return _get_device(BrickletAccelerometer, uid, _get_ipcon(host, port)).get_configuration()";return["_bricklet_accelerometer_get_configuration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_accelerometer_led_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_accelerometer="from tinkerforge.bricklet_accelerometer import BrickletAccelerometer";Blockly.Python.definitions_.bricklet_accelerometer_led_on="def _bricklet_accelerometer_led_on(host, port_ip, uid):\n  _get_device(BrickletAccelerometer, uid, _get_ipcon(host, port)).led_on()";return"_bricklet_accelerometer_led_on("+c+", "+a+
", "+b+")\n"};
Blockly.Python.bricklet_accelerometer_led_off=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_accelerometer=
"from tinkerforge.bricklet_accelerometer import BrickletAccelerometer";Blockly.Python.definitions_.bricklet_accelerometer_led_off="def _bricklet_accelerometer_led_off(host, port_ip, uid):\n  _get_device(BrickletAccelerometer, uid, _get_ipcon(host, port)).led_off()";return"_bricklet_accelerometer_led_off("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_accelerometer_is_led_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_accelerometer="from tinkerforge.bricklet_accelerometer import BrickletAccelerometer";Blockly.Python.definitions_.bricklet_accelerometer_is_led_on="def _bricklet_accelerometer_is_led_on(host, port_ip, uid):\n  return _get_device(BrickletAccelerometer, uid, _get_ipcon(host, port)).is_led_on()";return["_bricklet_accelerometer_is_led_on("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_accelerometer_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_accelerometer="from tinkerforge.bricklet_accelerometer import BrickletAccelerometer";Blockly.Python.definitions_.bricklet_accelerometer_get_identity="def _bricklet_accelerometer_get_identity(host, port_ip, uid):\n  return _get_device(BrickletAccelerometer, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_accelerometer_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ambient_light_get_illuminance=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ambient_light="from tinkerforge.bricklet_ambient_light import BrickletAmbientLight";Blockly.Python.definitions_.bricklet_ambient_light_get_illuminance="def _bricklet_ambient_light_get_illuminance(host, port_ip, uid):\n  return _get_device(BrickletAmbientLight, uid, _get_ipcon(host, port)).get_illuminance()";return["_bricklet_ambient_light_get_illuminance("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ambient_light_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ambient_light="from tinkerforge.bricklet_ambient_light import BrickletAmbientLight";Blockly.Python.definitions_.bricklet_ambient_light_get_analog_value="def _bricklet_ambient_light_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletAmbientLight, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_ambient_light_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ambient_light_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ambient_light="from tinkerforge.bricklet_ambient_light import BrickletAmbientLight";Blockly.Python.definitions_.bricklet_ambient_light_get_identity="def _bricklet_ambient_light_get_identity(host, port_ip, uid):\n  return _get_device(BrickletAmbientLight, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_ambient_light_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ambient_light_v2_get_illuminance=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ambient_light_v2="from tinkerforge.bricklet_ambient_light_v2 import BrickletAmbientLightV2";Blockly.Python.definitions_.bricklet_ambient_light_v2_get_illuminance="def _bricklet_ambient_light_v2_get_illuminance(host, port_ip, uid):\n  return _get_device(BrickletAmbientLightV2, uid, _get_ipcon(host, port)).get_illuminance()";return["_bricklet_ambient_light_v2_get_illuminance("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ambient_light_v2_set_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("ILLUMINANCE_RANGE");a=a.getFieldValue("INTEGRATION_TIME");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ambient_light_v2="from tinkerforge.bricklet_ambient_light_v2 import BrickletAmbientLightV2";Blockly.Python.definitions_.bricklet_ambient_light_v2_set_configuration="def _bricklet_ambient_light_v2_set_configuration(host, port_ip, uid, illuminance_range, integration_time):\n  _get_device(BrickletAmbientLightV2, uid, _get_ipcon(host, port)).set_configuration(illuminance_range, integration_time)";
return"_bricklet_ambient_light_v2_set_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_ambient_light_v2_get_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ambient_light_v2="from tinkerforge.bricklet_ambient_light_v2 import BrickletAmbientLightV2";Blockly.Python.definitions_.bricklet_ambient_light_v2_get_configuration="def _bricklet_ambient_light_v2_get_configuration(host, port_ip, uid):\n  return _get_device(BrickletAmbientLightV2, uid, _get_ipcon(host, port)).get_configuration()";
return["_bricklet_ambient_light_v2_get_configuration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ambient_light_v2_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ambient_light_v2="from tinkerforge.bricklet_ambient_light_v2 import BrickletAmbientLightV2";Blockly.Python.definitions_.bricklet_ambient_light_v2_get_identity="def _bricklet_ambient_light_v2_get_identity(host, port_ip, uid):\n  return _get_device(BrickletAmbientLightV2, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_ambient_light_v2_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_get_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in="from tinkerforge.bricklet_analog_in import BrickletAnalogIn";Blockly.Python.definitions_.bricklet_analog_in_get_voltage="def _bricklet_analog_in_get_voltage(host, port_ip, uid):\n  return _get_device(BrickletAnalogIn, uid, _get_ipcon(host, port)).get_voltage()";return["_bricklet_analog_in_get_voltage("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in="from tinkerforge.bricklet_analog_in import BrickletAnalogIn";Blockly.Python.definitions_.bricklet_analog_in_get_analog_value="def _bricklet_analog_in_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletAnalogIn, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_analog_in_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_set_range=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("RANGE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in="from tinkerforge.bricklet_analog_in import BrickletAnalogIn";Blockly.Python.definitions_.bricklet_analog_in_set_range="def _bricklet_analog_in_set_range(host, port_ip, uid, range):\n  _get_device(BrickletAnalogIn, uid, _get_ipcon(host, port)).set_range(range)";return"_bricklet_analog_in_set_range("+String(c)+", "+
String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_analog_in_get_range=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in="from tinkerforge.bricklet_analog_in import BrickletAnalogIn";Blockly.Python.definitions_.bricklet_analog_in_get_range="def _bricklet_analog_in_get_range(host, port_ip, uid):\n  return _get_device(BrickletAnalogIn, uid, _get_ipcon(host, port)).get_range()";return["_bricklet_analog_in_get_range("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_set_averaging=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"AVERAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in="from tinkerforge.bricklet_analog_in import BrickletAnalogIn";Blockly.Python.definitions_.bricklet_analog_in_set_averaging="def _bricklet_analog_in_set_averaging(host, port_ip, uid, average):\n  _get_device(BrickletAnalogIn, uid, _get_ipcon(host, port)).set_averaging(average)";return"_bricklet_analog_in_set_averaging("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_analog_in_get_averaging=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in="from tinkerforge.bricklet_analog_in import BrickletAnalogIn";Blockly.Python.definitions_.bricklet_analog_in_get_averaging="def _bricklet_analog_in_get_averaging(host, port_ip, uid):\n  return _get_device(BrickletAnalogIn, uid, _get_ipcon(host, port)).get_averaging()";return["_bricklet_analog_in_get_averaging("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in="from tinkerforge.bricklet_analog_in import BrickletAnalogIn";Blockly.Python.definitions_.bricklet_analog_in_get_identity="def _bricklet_analog_in_get_identity(host, port_ip, uid):\n  return _get_device(BrickletAnalogIn, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_analog_in_get_identity("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_v2_get_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in_v2="from tinkerforge.bricklet_analog_in_v2 import BrickletAnalogInV2";Blockly.Python.definitions_.bricklet_analog_in_v2_get_voltage="def _bricklet_analog_in_v2_get_voltage(host, port_ip, uid):\n  return _get_device(BrickletAnalogInV2, uid, _get_ipcon(host, port)).get_voltage()";return["_bricklet_analog_in_v2_get_voltage("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_v2_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in_v2="from tinkerforge.bricklet_analog_in_v2 import BrickletAnalogInV2";Blockly.Python.definitions_.bricklet_analog_in_v2_get_analog_value="def _bricklet_analog_in_v2_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletAnalogInV2, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_analog_in_v2_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_v2_set_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"AVERAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in_v2="from tinkerforge.bricklet_analog_in_v2 import BrickletAnalogInV2";Blockly.Python.definitions_.bricklet_analog_in_v2_set_moving_average="def _bricklet_analog_in_v2_set_moving_average(host, port_ip, uid, average):\n  _get_device(BrickletAnalogInV2, uid, _get_ipcon(host, port)).set_moving_average(average)";return"_bricklet_analog_in_v2_set_moving_average("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_analog_in_v2_get_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in_v2="from tinkerforge.bricklet_analog_in_v2 import BrickletAnalogInV2";Blockly.Python.definitions_.bricklet_analog_in_v2_get_moving_average="def _bricklet_analog_in_v2_get_moving_average(host, port_ip, uid):\n  return _get_device(BrickletAnalogInV2, uid, _get_ipcon(host, port)).get_moving_average()";return["_bricklet_analog_in_v2_get_moving_average("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_in_v2_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_in_v2="from tinkerforge.bricklet_analog_in_v2 import BrickletAnalogInV2";Blockly.Python.definitions_.bricklet_analog_in_v2_get_identity="def _bricklet_analog_in_v2_get_identity(host, port_ip, uid):\n  return _get_device(BrickletAnalogInV2, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_analog_in_v2_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_out_set_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VOLTAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out="from tinkerforge.bricklet_analog_out import BrickletAnalogOut";Blockly.Python.definitions_.bricklet_analog_out_set_voltage="def _bricklet_analog_out_set_voltage(host, port_ip, uid, voltage):\n  _get_device(BrickletAnalogOut, uid, _get_ipcon(host, port)).set_voltage(voltage)";return"_bricklet_analog_out_set_voltage("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_analog_out_get_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out="from tinkerforge.bricklet_analog_out import BrickletAnalogOut";Blockly.Python.definitions_.bricklet_analog_out_get_voltage="def _bricklet_analog_out_get_voltage(host, port_ip, uid):\n  return _get_device(BrickletAnalogOut, uid, _get_ipcon(host, port)).get_voltage()";return["_bricklet_analog_out_get_voltage("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_out_set_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("MODE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out="from tinkerforge.bricklet_analog_out import BrickletAnalogOut";Blockly.Python.definitions_.bricklet_analog_out_set_mode="def _bricklet_analog_out_set_mode(host, port_ip, uid, mode):\n  _get_device(BrickletAnalogOut, uid, _get_ipcon(host, port)).set_mode(mode)";return"_bricklet_analog_out_set_mode("+String(c)+", "+
String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_analog_out_get_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out="from tinkerforge.bricklet_analog_out import BrickletAnalogOut";Blockly.Python.definitions_.bricklet_analog_out_get_mode="def _bricklet_analog_out_get_mode(host, port_ip, uid):\n  return _get_device(BrickletAnalogOut, uid, _get_ipcon(host, port)).get_mode()";return["_bricklet_analog_out_get_mode("+c+", "+a+", "+b+
")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_out_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out="from tinkerforge.bricklet_analog_out import BrickletAnalogOut";Blockly.Python.definitions_.bricklet_analog_out_get_identity="def _bricklet_analog_out_get_identity(host, port_ip, uid):\n  return _get_device(BrickletAnalogOut, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_analog_out_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_out_v2_set_output_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VOLTAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out_v2="from tinkerforge.bricklet_analog_out_v2 import BrickletAnalogOutV2";Blockly.Python.definitions_.bricklet_analog_out_v2_set_output_voltage="def _bricklet_analog_out_v2_set_output_voltage(host, port_ip, uid, voltage):\n  _get_device(BrickletAnalogOutV2, uid, _get_ipcon(host, port)).set_output_voltage(voltage)";return"_bricklet_analog_out_v2_set_output_voltage("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_analog_out_v2_get_output_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out_v2="from tinkerforge.bricklet_analog_out_v2 import BrickletAnalogOutV2";Blockly.Python.definitions_.bricklet_analog_out_v2_get_output_voltage="def _bricklet_analog_out_v2_get_output_voltage(host, port_ip, uid):\n  return _get_device(BrickletAnalogOutV2, uid, _get_ipcon(host, port)).get_output_voltage()";return["_bricklet_analog_out_v2_get_output_voltage("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_out_v2_get_input_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out_v2="from tinkerforge.bricklet_analog_out_v2 import BrickletAnalogOutV2";Blockly.Python.definitions_.bricklet_analog_out_v2_get_input_voltage="def _bricklet_analog_out_v2_get_input_voltage(host, port_ip, uid):\n  return _get_device(BrickletAnalogOutV2, uid, _get_ipcon(host, port)).get_input_voltage()";return["_bricklet_analog_out_v2_get_input_voltage("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_analog_out_v2_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_analog_out_v2="from tinkerforge.bricklet_analog_out_v2 import BrickletAnalogOutV2";Blockly.Python.definitions_.bricklet_analog_out_v2_get_identity="def _bricklet_analog_out_v2_get_identity(host, port_ip, uid):\n  return _get_device(BrickletAnalogOutV2, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_analog_out_v2_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_barometer_get_air_pressure=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_barometer="from tinkerforge.bricklet_barometer import BrickletBarometer";Blockly.Python.definitions_.bricklet_barometer_get_air_pressure="def _bricklet_barometer_get_air_pressure(host, port_ip, uid):\n  return _get_device(BrickletBarometer, uid, _get_ipcon(host, port)).get_air_pressure()";return["_bricklet_barometer_get_air_pressure("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_barometer_get_altitude=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_barometer="from tinkerforge.bricklet_barometer import BrickletBarometer";Blockly.Python.definitions_.bricklet_barometer_get_altitude="def _bricklet_barometer_get_altitude(host, port_ip, uid):\n  return _get_device(BrickletBarometer, uid, _get_ipcon(host, port)).get_altitude()";return["_bricklet_barometer_get_altitude("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_barometer_set_reference_air_pressure=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"AIR_PRESSURE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_barometer="from tinkerforge.bricklet_barometer import BrickletBarometer";Blockly.Python.definitions_.bricklet_barometer_set_reference_air_pressure="def _bricklet_barometer_set_reference_air_pressure(host, port_ip, uid, air_pressure):\n  _get_device(BrickletBarometer, uid, _get_ipcon(host, port)).set_reference_air_pressure(air_pressure)";
return"_bricklet_barometer_set_reference_air_pressure("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_barometer_get_chip_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_barometer="from tinkerforge.bricklet_barometer import BrickletBarometer";Blockly.Python.definitions_.bricklet_barometer_get_chip_temperature="def _bricklet_barometer_get_chip_temperature(host, port_ip, uid):\n  return _get_device(BrickletBarometer, uid, _get_ipcon(host, port)).get_chip_temperature()";return["_bricklet_barometer_get_chip_temperature("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_barometer_get_reference_air_pressure=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_barometer="from tinkerforge.bricklet_barometer import BrickletBarometer";Blockly.Python.definitions_.bricklet_barometer_get_reference_air_pressure="def _bricklet_barometer_get_reference_air_pressure(host, port_ip, uid):\n  return _get_device(BrickletBarometer, uid, _get_ipcon(host, port)).get_reference_air_pressure()";return["_bricklet_barometer_get_reference_air_pressure("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_barometer_set_averaging=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"MOVING_AVERAGE_PRESSURE",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"AVERAGE_PRESSURE",Blockly.JavaScript.ORDER_ATOMIC);
a=Blockly.JavaScript.valueToCode(a,"AVERAGE_TEMPERATURE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_barometer=
"from tinkerforge.bricklet_barometer import BrickletBarometer";Blockly.Python.definitions_.bricklet_barometer_set_averaging="def _bricklet_barometer_set_averaging(host, port_ip, uid, moving_average_pressure, average_pressure, average_temperature):\n  _get_device(BrickletBarometer, uid, _get_ipcon(host, port)).set_averaging(moving_average_pressure, average_pressure, average_temperature)";return"_bricklet_barometer_set_averaging("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+
", "+String(a)+")\n"};
Blockly.Python.bricklet_barometer_get_averaging=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_barometer=
"from tinkerforge.bricklet_barometer import BrickletBarometer";Blockly.Python.definitions_.bricklet_barometer_get_averaging="def _bricklet_barometer_get_averaging(host, port_ip, uid):\n  return _get_device(BrickletBarometer, uid, _get_ipcon(host, port)).get_averaging()";return["_bricklet_barometer_get_averaging("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_barometer_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_barometer="from tinkerforge.bricklet_barometer import BrickletBarometer";Blockly.Python.definitions_.bricklet_barometer_get_identity="def _bricklet_barometer_get_identity(host, port_ip, uid):\n  return _get_device(BrickletBarometer, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_barometer_get_identity("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_co2_get_co2_concentration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_co2="from tinkerforge.bricklet_co2 import BrickletCO2";Blockly.Python.definitions_.bricklet_co2_get_co2_concentration="def _bricklet_co2_get_co2_concentration(host, port_ip, uid):\n  return _get_device(BrickletCO2, uid, _get_ipcon(host, port)).get_co2_concentration()";return["_bricklet_co2_get_co2_concentration("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_co2_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_co2="from tinkerforge.bricklet_co2 import BrickletCO2";Blockly.Python.definitions_.bricklet_co2_get_identity="def _bricklet_co2_get_identity(host, port_ip, uid):\n  return _get_device(BrickletCO2, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_co2_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_color_get_color=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_get_color="def _bricklet_color_get_color(host, port_ip, uid):\n  return _get_device(BrickletColor, uid, _get_ipcon(host, port)).get_color()";return["_bricklet_color_get_color("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_color_light_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_light_on="def _bricklet_color_light_on(host, port_ip, uid):\n  _get_device(BrickletColor, uid, _get_ipcon(host, port)).light_on()";return"_bricklet_color_light_on("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_color_light_off=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_light_off="def _bricklet_color_light_off(host, port_ip, uid):\n  _get_device(BrickletColor, uid, _get_ipcon(host, port)).light_off()";return"_bricklet_color_light_off("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_color_is_light_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_is_light_on="def _bricklet_color_is_light_on(host, port_ip, uid):\n  return _get_device(BrickletColor, uid, _get_ipcon(host, port)).is_light_on()";return["_bricklet_color_is_light_on("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_color_set_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("GAIN");a=a.getFieldValue("INTEGRATION_TIME");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_set_config="def _bricklet_color_set_config(host, port_ip, uid, gain, integration_time):\n  _get_device(BrickletColor, uid, _get_ipcon(host, port)).set_config(gain, integration_time)";return"_bricklet_color_set_config("+String(c)+
", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_color_get_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_get_config="def _bricklet_color_get_config(host, port_ip, uid):\n  return _get_device(BrickletColor, uid, _get_ipcon(host, port)).get_config()";return["_bricklet_color_get_config("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_color_get_illuminance=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_get_illuminance="def _bricklet_color_get_illuminance(host, port_ip, uid):\n  return _get_device(BrickletColor, uid, _get_ipcon(host, port)).get_illuminance()";return["_bricklet_color_get_illuminance("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_color_get_color_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_get_color_temperature="def _bricklet_color_get_color_temperature(host, port_ip, uid):\n  return _get_device(BrickletColor, uid, _get_ipcon(host, port)).get_color_temperature()";return["_bricklet_color_get_color_temperature("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_color_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_color="from tinkerforge.bricklet_color import BrickletColor";Blockly.Python.definitions_.bricklet_color_get_identity="def _bricklet_color_get_identity(host, port_ip, uid):\n  return _get_device(BrickletColor, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_color_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_current12_get_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current12="from tinkerforge.bricklet_current12 import BrickletCurrent12";Blockly.Python.definitions_.bricklet_current12_get_current="def _bricklet_current12_get_current(host, port_ip, uid):\n  return _get_device(BrickletCurrent12, uid, _get_ipcon(host, port)).get_current()";return["_bricklet_current12_get_current("+c+", "+a+
", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_current12_calibrate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current12="from tinkerforge.bricklet_current12 import BrickletCurrent12";Blockly.Python.definitions_.bricklet_current12_calibrate="def _bricklet_current12_calibrate(host, port_ip, uid):\n  _get_device(BrickletCurrent12, uid, _get_ipcon(host, port)).calibrate()";return"_bricklet_current12_calibrate("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_current12_is_over_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current12="from tinkerforge.bricklet_current12 import BrickletCurrent12";Blockly.Python.definitions_.bricklet_current12_is_over_current="def _bricklet_current12_is_over_current(host, port_ip, uid):\n  return _get_device(BrickletCurrent12, uid, _get_ipcon(host, port)).is_over_current()";return["_bricklet_current12_is_over_current("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_current12_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current12="from tinkerforge.bricklet_current12 import BrickletCurrent12";Blockly.Python.definitions_.bricklet_current12_get_analog_value="def _bricklet_current12_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletCurrent12, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_current12_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_current12_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current12="from tinkerforge.bricklet_current12 import BrickletCurrent12";Blockly.Python.definitions_.bricklet_current12_get_identity="def _bricklet_current12_get_identity(host, port_ip, uid):\n  return _get_device(BrickletCurrent12, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_current12_get_identity("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_current25_get_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current25="from tinkerforge.bricklet_current25 import BrickletCurrent25";Blockly.Python.definitions_.bricklet_current25_get_current="def _bricklet_current25_get_current(host, port_ip, uid):\n  return _get_device(BrickletCurrent25, uid, _get_ipcon(host, port)).get_current()";return["_bricklet_current25_get_current("+c+", "+a+
", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_current25_calibrate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current25="from tinkerforge.bricklet_current25 import BrickletCurrent25";Blockly.Python.definitions_.bricklet_current25_calibrate="def _bricklet_current25_calibrate(host, port_ip, uid):\n  _get_device(BrickletCurrent25, uid, _get_ipcon(host, port)).calibrate()";return"_bricklet_current25_calibrate("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_current25_is_over_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current25="from tinkerforge.bricklet_current25 import BrickletCurrent25";Blockly.Python.definitions_.bricklet_current25_is_over_current="def _bricklet_current25_is_over_current(host, port_ip, uid):\n  return _get_device(BrickletCurrent25, uid, _get_ipcon(host, port)).is_over_current()";return["_bricklet_current25_is_over_current("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_current25_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current25="from tinkerforge.bricklet_current25 import BrickletCurrent25";Blockly.Python.definitions_.bricklet_current25_get_analog_value="def _bricklet_current25_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletCurrent25, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_current25_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_current25_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_current25="from tinkerforge.bricklet_current25 import BrickletCurrent25";Blockly.Python.definitions_.bricklet_current25_get_identity="def _bricklet_current25_get_identity(host, port_ip, uid):\n  return _get_device(BrickletCurrent25, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_current25_get_identity("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_distance_ir_get_distance=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_ir="from tinkerforge.bricklet_distance_ir import BrickletDistanceIR";Blockly.Python.definitions_.bricklet_distance_ir_get_distance="def _bricklet_distance_ir_get_distance(host, port_ip, uid):\n  return _get_device(BrickletDistanceIR, uid, _get_ipcon(host, port)).get_distance()";return["_bricklet_distance_ir_get_distance("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_distance_ir_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_ir="from tinkerforge.bricklet_distance_ir import BrickletDistanceIR";Blockly.Python.definitions_.bricklet_distance_ir_get_analog_value="def _bricklet_distance_ir_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletDistanceIR, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_distance_ir_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_distance_ir_set_sampling_point=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"DISTANCE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_ir="from tinkerforge.bricklet_distance_ir import BrickletDistanceIR";Blockly.Python.definitions_.bricklet_distance_ir_set_sampling_point="def _bricklet_distance_ir_set_sampling_point(host, port_ip, uid, position, distance):\n  _get_device(BrickletDistanceIR, uid, _get_ipcon(host, port)).set_sampling_point(position, distance)";
return"_bricklet_distance_ir_set_sampling_point("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_distance_ir_get_sampling_point=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_ir="from tinkerforge.bricklet_distance_ir import BrickletDistanceIR";Blockly.Python.definitions_.bricklet_distance_ir_get_sampling_point="def _bricklet_distance_ir_get_sampling_point(host, port_ip, uid, position):\n  return _get_device(BrickletDistanceIR, uid, _get_ipcon(host, port)).get_sampling_point(position)";return["_bricklet_distance_ir_get_sampling_point("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_distance_ir_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_ir="from tinkerforge.bricklet_distance_ir import BrickletDistanceIR";Blockly.Python.definitions_.bricklet_distance_ir_get_identity="def _bricklet_distance_ir_get_identity(host, port_ip, uid):\n  return _get_device(BrickletDistanceIR, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_distance_ir_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_distance_us_get_distance_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_us="from tinkerforge.bricklet_distance_us import BrickletDistanceUS";Blockly.Python.definitions_.bricklet_distance_us_get_distance_value="def _bricklet_distance_us_get_distance_value(host, port_ip, uid):\n  return _get_device(BrickletDistanceUS, uid, _get_ipcon(host, port)).get_distance_value()";return["_bricklet_distance_us_get_distance_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_distance_us_set_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"AVERAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_us="from tinkerforge.bricklet_distance_us import BrickletDistanceUS";Blockly.Python.definitions_.bricklet_distance_us_set_moving_average="def _bricklet_distance_us_set_moving_average(host, port_ip, uid, average):\n  _get_device(BrickletDistanceUS, uid, _get_ipcon(host, port)).set_moving_average(average)";return"_bricklet_distance_us_set_moving_average("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_distance_us_get_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_us="from tinkerforge.bricklet_distance_us import BrickletDistanceUS";Blockly.Python.definitions_.bricklet_distance_us_get_moving_average="def _bricklet_distance_us_get_moving_average(host, port_ip, uid):\n  return _get_device(BrickletDistanceUS, uid, _get_ipcon(host, port)).get_moving_average()";return["_bricklet_distance_us_get_moving_average("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_distance_us_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_distance_us="from tinkerforge.bricklet_distance_us import BrickletDistanceUS";Blockly.Python.definitions_.bricklet_distance_us_get_identity="def _bricklet_distance_us_get_identity(host, port_ip, uid):\n  return _get_device(BrickletDistanceUS, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_distance_us_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dual_button_set_led_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("LED_L");a=a.getFieldValue("LED_R");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_button="from tinkerforge.bricklet_dual_button import BrickletDualButton";Blockly.Python.definitions_.bricklet_dual_button_set_led_state="def _bricklet_dual_button_set_led_state(host, port_ip, uid, led_l, led_r):\n  _get_device(BrickletDualButton, uid, _get_ipcon(host, port)).set_led_state(led_l, led_r)";return"_bricklet_dual_button_set_led_state("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_dual_button_get_led_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_button="from tinkerforge.bricklet_dual_button import BrickletDualButton";Blockly.Python.definitions_.bricklet_dual_button_get_led_state="def _bricklet_dual_button_get_led_state(host, port_ip, uid):\n  return _get_device(BrickletDualButton, uid, _get_ipcon(host, port)).get_led_state()";return["_bricklet_dual_button_get_led_state("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dual_button_get_button_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_button="from tinkerforge.bricklet_dual_button import BrickletDualButton";Blockly.Python.definitions_.bricklet_dual_button_get_button_state="def _bricklet_dual_button_get_button_state(host, port_ip, uid):\n  return _get_device(BrickletDualButton, uid, _get_ipcon(host, port)).get_button_state()";return["_bricklet_dual_button_get_button_state("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dual_button_set_selected_led_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("LED");a=a.getFieldValue("STATE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_button="from tinkerforge.bricklet_dual_button import BrickletDualButton";Blockly.Python.definitions_.bricklet_dual_button_set_selected_led_state="def _bricklet_dual_button_set_selected_led_state(host, port_ip, uid, led, state):\n  _get_device(BrickletDualButton, uid, _get_ipcon(host, port)).set_selected_led_state(led, state)";
return"_bricklet_dual_button_set_selected_led_state("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_dual_button_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_button="from tinkerforge.bricklet_dual_button import BrickletDualButton";Blockly.Python.definitions_.bricklet_dual_button_get_identity="def _bricklet_dual_button_get_identity(host, port_ip, uid):\n  return _get_device(BrickletDualButton, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_dual_button_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dual_relay_set_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("RELAY1");a=a.getFieldValue("RELAY2");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_relay="from tinkerforge.bricklet_dual_relay import BrickletDualRelay";Blockly.Python.definitions_.bricklet_dual_relay_set_state="def _bricklet_dual_relay_set_state(host, port_ip, uid, relay1, relay2):\n  _get_device(BrickletDualRelay, uid, _get_ipcon(host, port)).set_state(relay1, relay2)";return"_bricklet_dual_relay_set_state("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_dual_relay_get_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_relay="from tinkerforge.bricklet_dual_relay import BrickletDualRelay";Blockly.Python.definitions_.bricklet_dual_relay_get_state="def _bricklet_dual_relay_get_state(host, port_ip, uid):\n  return _get_device(BrickletDualRelay, uid, _get_ipcon(host, port)).get_state()";return["_bricklet_dual_relay_get_state("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dual_relay_set_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"RELAY",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"TIME",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("STATE");
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_relay="from tinkerforge.bricklet_dual_relay import BrickletDualRelay";Blockly.Python.definitions_.bricklet_dual_relay_set_monoflop="def _bricklet_dual_relay_set_monoflop(host, port_ip, uid, relay, state, time):\n  _get_device(BrickletDualRelay, uid, _get_ipcon(host, port)).set_monoflop(relay, state, time)";return"_bricklet_dual_relay_set_monoflop("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+", "+String(f)+")\n"};
Blockly.Python.bricklet_dual_relay_get_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"RELAY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_relay="from tinkerforge.bricklet_dual_relay import BrickletDualRelay";Blockly.Python.definitions_.bricklet_dual_relay_get_monoflop="def _bricklet_dual_relay_get_monoflop(host, port_ip, uid, relay):\n  return _get_device(BrickletDualRelay, uid, _get_ipcon(host, port)).get_monoflop(relay)";return["_bricklet_dual_relay_get_monoflop("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dual_relay_set_selected_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"RELAY",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("STATE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_relay="from tinkerforge.bricklet_dual_relay import BrickletDualRelay";Blockly.Python.definitions_.bricklet_dual_relay_set_selected_state="def _bricklet_dual_relay_set_selected_state(host, port_ip, uid, relay, state):\n  _get_device(BrickletDualRelay, uid, _get_ipcon(host, port)).set_selected_state(relay, state)";return"_bricklet_dual_relay_set_selected_state("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_dual_relay_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dual_relay="from tinkerforge.bricklet_dual_relay import BrickletDualRelay";Blockly.Python.definitions_.bricklet_dual_relay_get_identity="def _bricklet_dual_relay_get_identity(host, port_ip, uid):\n  return _get_device(BrickletDualRelay, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_dual_relay_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dust_detector_get_dust_density=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dust_detector="from tinkerforge.bricklet_dust_detector import BrickletDustDetector";Blockly.Python.definitions_.bricklet_dust_detector_get_dust_density="def _bricklet_dust_detector_get_dust_density(host, port_ip, uid):\n  return _get_device(BrickletDustDetector, uid, _get_ipcon(host, port)).get_dust_density()";return["_bricklet_dust_detector_get_dust_density("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dust_detector_set_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"AVERAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dust_detector="from tinkerforge.bricklet_dust_detector import BrickletDustDetector";Blockly.Python.definitions_.bricklet_dust_detector_set_moving_average="def _bricklet_dust_detector_set_moving_average(host, port_ip, uid, average):\n  _get_device(BrickletDustDetector, uid, _get_ipcon(host, port)).set_moving_average(average)";
return"_bricklet_dust_detector_set_moving_average("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_dust_detector_get_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dust_detector="from tinkerforge.bricklet_dust_detector import BrickletDustDetector";Blockly.Python.definitions_.bricklet_dust_detector_get_moving_average="def _bricklet_dust_detector_get_moving_average(host, port_ip, uid):\n  return _get_device(BrickletDustDetector, uid, _get_ipcon(host, port)).get_moving_average()";return["_bricklet_dust_detector_get_moving_average("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_dust_detector_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_dust_detector="from tinkerforge.bricklet_dust_detector import BrickletDustDetector";Blockly.Python.definitions_.bricklet_dust_detector_get_identity="def _bricklet_dust_detector_get_identity(host, port_ip, uid):\n  return _get_device(BrickletDustDetector, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_dust_detector_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_gps_get_coordinates=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_gps="from tinkerforge.bricklet_gps import BrickletGPS";Blockly.Python.definitions_.bricklet_gps_get_coordinates="def _bricklet_gps_get_coordinates(host, port_ip, uid):\n  return _get_device(BrickletGPS, uid, _get_ipcon(host, port)).get_coordinates()";return["_bricklet_gps_get_coordinates("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_gps_get_status=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_gps="from tinkerforge.bricklet_gps import BrickletGPS";Blockly.Python.definitions_.bricklet_gps_get_status="def _bricklet_gps_get_status(host, port_ip, uid):\n  return _get_device(BrickletGPS, uid, _get_ipcon(host, port)).get_status()";return["_bricklet_gps_get_status("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_gps_get_altitude=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_gps="from tinkerforge.bricklet_gps import BrickletGPS";Blockly.Python.definitions_.bricklet_gps_get_altitude="def _bricklet_gps_get_altitude(host, port_ip, uid):\n  return _get_device(BrickletGPS, uid, _get_ipcon(host, port)).get_altitude()";return["_bricklet_gps_get_altitude("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_gps_get_motion=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_gps="from tinkerforge.bricklet_gps import BrickletGPS";Blockly.Python.definitions_.bricklet_gps_get_motion="def _bricklet_gps_get_motion(host, port_ip, uid):\n  return _get_device(BrickletGPS, uid, _get_ipcon(host, port)).get_motion()";return["_bricklet_gps_get_motion("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_gps_get_date_time=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_gps="from tinkerforge.bricklet_gps import BrickletGPS";Blockly.Python.definitions_.bricklet_gps_get_date_time="def _bricklet_gps_get_date_time(host, port_ip, uid):\n  return _get_device(BrickletGPS, uid, _get_ipcon(host, port)).get_date_time()";return["_bricklet_gps_get_date_time("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_gps_restart=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("RESTART_TYPE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_gps="from tinkerforge.bricklet_gps import BrickletGPS";Blockly.Python.definitions_.bricklet_gps_restart="def _bricklet_gps_restart(host, port_ip, uid, restart_type):\n  _get_device(BrickletGPS, uid, _get_ipcon(host, port)).restart(restart_type)";return"_bricklet_gps_restart("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+
")\n"};
Blockly.Python.bricklet_gps_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_gps=
"from tinkerforge.bricklet_gps import BrickletGPS";Blockly.Python.definitions_.bricklet_gps_get_identity="def _bricklet_gps_get_identity(host, port_ip, uid):\n  return _get_device(BrickletGPS, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_gps_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_hall_effect_get_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_hall_effect="from tinkerforge.bricklet_hall_effect import BrickletHallEffect";Blockly.Python.definitions_.bricklet_hall_effect_get_value="def _bricklet_hall_effect_get_value(host, port_ip, uid):\n  return _get_device(BrickletHallEffect, uid, _get_ipcon(host, port)).get_value()";return["_bricklet_hall_effect_get_value("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_hall_effect_get_edge_count=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("RESET_COUNTER");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_hall_effect="from tinkerforge.bricklet_hall_effect import BrickletHallEffect";Blockly.Python.definitions_.bricklet_hall_effect_get_edge_count="def _bricklet_hall_effect_get_edge_count(host, port_ip, uid, reset_counter):\n  return _get_device(BrickletHallEffect, uid, _get_ipcon(host, port)).get_edge_count(reset_counter)";return["_bricklet_hall_effect_get_edge_count("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_hall_effect_set_edge_count_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"DEBOUNCE",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("EDGE_TYPE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_hall_effect="from tinkerforge.bricklet_hall_effect import BrickletHallEffect";Blockly.Python.definitions_.bricklet_hall_effect_set_edge_count_config="def _bricklet_hall_effect_set_edge_count_config(host, port_ip, uid, edge_type, debounce):\n  _get_device(BrickletHallEffect, uid, _get_ipcon(host, port)).set_edge_count_config(edge_type, debounce)";
return"_bricklet_hall_effect_set_edge_count_config("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+", "+String(e)+")\n"};
Blockly.Python.bricklet_hall_effect_get_edge_count_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_hall_effect="from tinkerforge.bricklet_hall_effect import BrickletHallEffect";Blockly.Python.definitions_.bricklet_hall_effect_get_edge_count_config="def _bricklet_hall_effect_get_edge_count_config(host, port_ip, uid):\n  return _get_device(BrickletHallEffect, uid, _get_ipcon(host, port)).get_edge_count_config()";return["_bricklet_hall_effect_get_edge_count_config("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_hall_effect_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_hall_effect="from tinkerforge.bricklet_hall_effect import BrickletHallEffect";Blockly.Python.definitions_.bricklet_hall_effect_get_identity="def _bricklet_hall_effect_get_identity(host, port_ip, uid):\n  return _get_device(BrickletHallEffect, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_hall_effect_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_humidity_get_humidity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_humidity="from tinkerforge.bricklet_humidity import BrickletHumidity";Blockly.Python.definitions_.bricklet_humidity_get_humidity="def _bricklet_humidity_get_humidity(host, port_ip, uid):\n  return _get_device(BrickletHumidity, uid, _get_ipcon(host, port)).get_humidity()";return["_bricklet_humidity_get_humidity("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_humidity_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_humidity="from tinkerforge.bricklet_humidity import BrickletHumidity";Blockly.Python.definitions_.bricklet_humidity_get_analog_value="def _bricklet_humidity_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletHumidity, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_humidity_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_humidity_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_humidity="from tinkerforge.bricklet_humidity import BrickletHumidity";Blockly.Python.definitions_.bricklet_humidity_get_identity="def _bricklet_humidity_get_identity(host, port_ip, uid):\n  return _get_device(BrickletHumidity, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_humidity_get_identity("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_analog_out_enable=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_enable="def _bricklet_industrial_analog_out_enable(host, port_ip, uid):\n  _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).enable()";return"_bricklet_industrial_analog_out_enable("+
c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_industrial_analog_out_disable=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out=
"from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_disable="def _bricklet_industrial_analog_out_disable(host, port_ip, uid):\n  _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).disable()";return"_bricklet_industrial_analog_out_disable("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_industrial_analog_out_is_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_is_enabled="def _bricklet_industrial_analog_out_is_enabled(host, port_ip, uid):\n  return _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).is_enabled()";
return["_bricklet_industrial_analog_out_is_enabled("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_analog_out_set_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VOLTAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_set_voltage="def _bricklet_industrial_analog_out_set_voltage(host, port_ip, uid, voltage):\n  _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).set_voltage(voltage)";
return"_bricklet_industrial_analog_out_set_voltage("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_analog_out_get_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_get_voltage="def _bricklet_industrial_analog_out_get_voltage(host, port_ip, uid):\n  return _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).get_voltage()";
return["_bricklet_industrial_analog_out_get_voltage("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_analog_out_set_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"CURRENT",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_set_current="def _bricklet_industrial_analog_out_set_current(host, port_ip, uid, current):\n  _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).set_current(current)";
return"_bricklet_industrial_analog_out_set_current("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_analog_out_get_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_get_current="def _bricklet_industrial_analog_out_get_current(host, port_ip, uid):\n  return _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).get_current()";
return["_bricklet_industrial_analog_out_get_current("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_analog_out_set_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("VOLTAGE_RANGE");a=a.getFieldValue("CURRENT_RANGE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_set_configuration="def _bricklet_industrial_analog_out_set_configuration(host, port_ip, uid, voltage_range, current_range):\n  _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).set_configuration(voltage_range, current_range)";
return"_bricklet_industrial_analog_out_set_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_analog_out_get_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_get_configuration="def _bricklet_industrial_analog_out_get_configuration(host, port_ip, uid):\n  return _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).get_configuration()";
return["_bricklet_industrial_analog_out_get_configuration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_analog_out_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_analog_out="from tinkerforge.bricklet_industrial_analog_out import BrickletIndustrialAnalogOut";Blockly.Python.definitions_.bricklet_industrial_analog_out_get_identity="def _bricklet_industrial_analog_out_get_identity(host, port_ip, uid):\n  return _get_device(BrickletIndustrialAnalogOut, uid, _get_ipcon(host, port)).get_identity()";
return["_bricklet_industrial_analog_out_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_in_4_get_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_in_4="from tinkerforge.bricklet_industrial_digital_in_4 import BrickletIndustrialDigitalIn4";Blockly.Python.definitions_.bricklet_industrial_digital_in_4_get_value="def _bricklet_industrial_digital_in_4_get_value(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDigitalIn4, uid, _get_ipcon(host, port)).get_value()";
return["_bricklet_industrial_digital_in_4_get_value("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_in_4_set_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"GROUP",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_in_4="from tinkerforge.bricklet_industrial_digital_in_4 import BrickletIndustrialDigitalIn4";Blockly.Python.definitions_.bricklet_industrial_digital_in_4_set_group="def _bricklet_industrial_digital_in_4_set_group(host, port_ip, uid, group):\n  _get_device(BrickletIndustrialDigitalIn4, uid, _get_ipcon(host, port)).set_group(group)";
return"_bricklet_industrial_digital_in_4_set_group("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_digital_in_4_get_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_in_4="from tinkerforge.bricklet_industrial_digital_in_4 import BrickletIndustrialDigitalIn4";Blockly.Python.definitions_.bricklet_industrial_digital_in_4_get_group="def _bricklet_industrial_digital_in_4_get_group(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDigitalIn4, uid, _get_ipcon(host, port)).get_group()";
return["_bricklet_industrial_digital_in_4_get_group("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_in_4_get_available_for_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_in_4="from tinkerforge.bricklet_industrial_digital_in_4 import BrickletIndustrialDigitalIn4";Blockly.Python.definitions_.bricklet_industrial_digital_in_4_get_available_for_group="def _bricklet_industrial_digital_in_4_get_available_for_group(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDigitalIn4, uid, _get_ipcon(host, port)).get_available_for_group()";
return["_bricklet_industrial_digital_in_4_get_available_for_group("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_in_4_get_edge_count=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("RESET_COUNTER");Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_in_4="from tinkerforge.bricklet_industrial_digital_in_4 import BrickletIndustrialDigitalIn4";Blockly.Python.definitions_.bricklet_industrial_digital_in_4_get_edge_count="def _bricklet_industrial_digital_in_4_get_edge_count(host, port_ip, uid, pin, reset_counter):\n  return _get_device(BrickletIndustrialDigitalIn4, uid, _get_ipcon(host, port)).get_edge_count(pin, reset_counter)";
return["_bricklet_industrial_digital_in_4_get_edge_count("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_in_4_set_edge_count_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"DEBOUNCE",Blockly.JavaScript.ORDER_ATOMIC);
a=a.getFieldValue("EDGE_TYPE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_in_4=
"from tinkerforge.bricklet_industrial_digital_in_4 import BrickletIndustrialDigitalIn4";Blockly.Python.definitions_.bricklet_industrial_digital_in_4_set_edge_count_config="def _bricklet_industrial_digital_in_4_set_edge_count_config(host, port_ip, uid, selection_mask, edge_type, debounce):\n  _get_device(BrickletIndustrialDigitalIn4, uid, _get_ipcon(host, port)).set_edge_count_config(selection_mask, edge_type, debounce)";return"_bricklet_industrial_digital_in_4_set_edge_count_config("+String(c)+", "+
String(d)+", "+String(b)+", "+String(e)+", "+String(a)+", "+String(f)+")\n"};
Blockly.Python.bricklet_industrial_digital_in_4_get_edge_count_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_in_4="from tinkerforge.bricklet_industrial_digital_in_4 import BrickletIndustrialDigitalIn4";Blockly.Python.definitions_.bricklet_industrial_digital_in_4_get_edge_count_config="def _bricklet_industrial_digital_in_4_get_edge_count_config(host, port_ip, uid, pin):\n  return _get_device(BrickletIndustrialDigitalIn4, uid, _get_ipcon(host, port)).get_edge_count_config(pin)";
return["_bricklet_industrial_digital_in_4_get_edge_count_config("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_in_4_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_in_4="from tinkerforge.bricklet_industrial_digital_in_4 import BrickletIndustrialDigitalIn4";Blockly.Python.definitions_.bricklet_industrial_digital_in_4_get_identity="def _bricklet_industrial_digital_in_4_get_identity(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDigitalIn4, uid, _get_ipcon(host, port)).get_identity()";
return["_bricklet_industrial_digital_in_4_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_out_4_set_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4="from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_set_value="def _bricklet_industrial_digital_out_4_set_value(host, port_ip, uid, value_mask):\n  _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).set_value(value_mask)";
return"_bricklet_industrial_digital_out_4_set_value("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_digital_out_4_get_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4="from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_get_value="def _bricklet_industrial_digital_out_4_get_value(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).get_value()";
return["_bricklet_industrial_digital_out_4_get_value("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_out_4_set_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);
a=Blockly.JavaScript.valueToCode(a,"TIME",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4=
"from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_set_monoflop="def _bricklet_industrial_digital_out_4_set_monoflop(host, port_ip, uid, selection_mask, value_mask, time):\n  _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).set_monoflop(selection_mask, value_mask, time)";return"_bricklet_industrial_digital_out_4_set_monoflop("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+
", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_digital_out_4_get_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4="from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_get_monoflop="def _bricklet_industrial_digital_out_4_get_monoflop(host, port_ip, uid, pin):\n  return _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).get_monoflop(pin)";
return["_bricklet_industrial_digital_out_4_get_monoflop("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_out_4_set_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"GROUP",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4="from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_set_group="def _bricklet_industrial_digital_out_4_set_group(host, port_ip, uid, group):\n  _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).set_group(group)";
return"_bricklet_industrial_digital_out_4_set_group("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_digital_out_4_get_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4="from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_get_group="def _bricklet_industrial_digital_out_4_get_group(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).get_group()";
return["_bricklet_industrial_digital_out_4_get_group("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_out_4_get_available_for_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4="from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_get_available_for_group="def _bricklet_industrial_digital_out_4_get_available_for_group(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).get_available_for_group()";
return["_bricklet_industrial_digital_out_4_get_available_for_group("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_digital_out_4_set_selected_values=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4="from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_set_selected_values="def _bricklet_industrial_digital_out_4_set_selected_values(host, port_ip, uid, selection_mask, value_mask):\n  _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).set_selected_values(selection_mask, value_mask)";
return"_bricklet_industrial_digital_out_4_set_selected_values("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_digital_out_4_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_digital_out_4="from tinkerforge.bricklet_industrial_digital_out_4 import BrickletIndustrialDigitalOut4";Blockly.Python.definitions_.bricklet_industrial_digital_out_4_get_identity="def _bricklet_industrial_digital_out_4_get_identity(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDigitalOut4, uid, _get_ipcon(host, port)).get_identity()";
return["_bricklet_industrial_digital_out_4_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_dual_0_20ma_get_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SENSOR",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_0_20ma="from tinkerforge.bricklet_industrial_dual_0_20ma import BrickletIndustrialDual020mA";Blockly.Python.definitions_.bricklet_industrial_dual_0_20ma_get_current="def _bricklet_industrial_dual_0_20ma_get_current(host, port_ip, uid, sensor):\n  return _get_device(BrickletIndustrialDual020mA, uid, _get_ipcon(host, port)).get_current(sensor)";
return["_bricklet_industrial_dual_0_20ma_get_current("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_dual_0_20ma_set_sample_rate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("RATE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_0_20ma="from tinkerforge.bricklet_industrial_dual_0_20ma import BrickletIndustrialDual020mA";Blockly.Python.definitions_.bricklet_industrial_dual_0_20ma_set_sample_rate="def _bricklet_industrial_dual_0_20ma_set_sample_rate(host, port_ip, uid, rate):\n  _get_device(BrickletIndustrialDual020mA, uid, _get_ipcon(host, port)).set_sample_rate(rate)";
return"_bricklet_industrial_dual_0_20ma_set_sample_rate("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_dual_0_20ma_get_sample_rate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_0_20ma="from tinkerforge.bricklet_industrial_dual_0_20ma import BrickletIndustrialDual020mA";Blockly.Python.definitions_.bricklet_industrial_dual_0_20ma_get_sample_rate="def _bricklet_industrial_dual_0_20ma_get_sample_rate(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDual020mA, uid, _get_ipcon(host, port)).get_sample_rate()";
return["_bricklet_industrial_dual_0_20ma_get_sample_rate("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_dual_0_20ma_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_0_20ma="from tinkerforge.bricklet_industrial_dual_0_20ma import BrickletIndustrialDual020mA";Blockly.Python.definitions_.bricklet_industrial_dual_0_20ma_get_identity="def _bricklet_industrial_dual_0_20ma_get_identity(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDual020mA, uid, _get_ipcon(host, port)).get_identity()";
return["_bricklet_industrial_dual_0_20ma_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_dual_analog_in_get_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"CHANNEL",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_analog_in="from tinkerforge.bricklet_industrial_dual_analog_in import BrickletIndustrialDualAnalogIn";Blockly.Python.definitions_.bricklet_industrial_dual_analog_in_get_voltage="def _bricklet_industrial_dual_analog_in_get_voltage(host, port_ip, uid, channel):\n  return _get_device(BrickletIndustrialDualAnalogIn, uid, _get_ipcon(host, port)).get_voltage(channel)";
return["_bricklet_industrial_dual_analog_in_get_voltage("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_dual_analog_in_set_sample_rate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("RATE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_analog_in="from tinkerforge.bricklet_industrial_dual_analog_in import BrickletIndustrialDualAnalogIn";Blockly.Python.definitions_.bricklet_industrial_dual_analog_in_set_sample_rate="def _bricklet_industrial_dual_analog_in_set_sample_rate(host, port_ip, uid, rate):\n  _get_device(BrickletIndustrialDualAnalogIn, uid, _get_ipcon(host, port)).set_sample_rate(rate)";
return"_bricklet_industrial_dual_analog_in_set_sample_rate("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_dual_analog_in_get_sample_rate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_analog_in="from tinkerforge.bricklet_industrial_dual_analog_in import BrickletIndustrialDualAnalogIn";Blockly.Python.definitions_.bricklet_industrial_dual_analog_in_get_sample_rate="def _bricklet_industrial_dual_analog_in_get_sample_rate(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDualAnalogIn, uid, _get_ipcon(host, port)).get_sample_rate()";
return["_bricklet_industrial_dual_analog_in_get_sample_rate("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_dual_analog_in_set_calibration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"OFFSET",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"GAIN",Blockly.JavaScript.ORDER_ATOMIC);
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_analog_in="from tinkerforge.bricklet_industrial_dual_analog_in import BrickletIndustrialDualAnalogIn";Blockly.Python.definitions_.bricklet_industrial_dual_analog_in_set_calibration="def _bricklet_industrial_dual_analog_in_set_calibration(host, port_ip, uid, offset, gain):\n  _get_device(BrickletIndustrialDualAnalogIn, uid, _get_ipcon(host, port)).set_calibration(offset, gain)";
return"_bricklet_industrial_dual_analog_in_set_calibration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_dual_analog_in_get_calibration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_analog_in="from tinkerforge.bricklet_industrial_dual_analog_in import BrickletIndustrialDualAnalogIn";Blockly.Python.definitions_.bricklet_industrial_dual_analog_in_get_calibration="def _bricklet_industrial_dual_analog_in_get_calibration(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDualAnalogIn, uid, _get_ipcon(host, port)).get_calibration()";
return["_bricklet_industrial_dual_analog_in_get_calibration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_dual_analog_in_get_adc_values=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_analog_in="from tinkerforge.bricklet_industrial_dual_analog_in import BrickletIndustrialDualAnalogIn";Blockly.Python.definitions_.bricklet_industrial_dual_analog_in_get_adc_values="def _bricklet_industrial_dual_analog_in_get_adc_values(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDualAnalogIn, uid, _get_ipcon(host, port)).get_adc_values()";
return["_bricklet_industrial_dual_analog_in_get_adc_values("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_dual_analog_in_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_dual_analog_in="from tinkerforge.bricklet_industrial_dual_analog_in import BrickletIndustrialDualAnalogIn";Blockly.Python.definitions_.bricklet_industrial_dual_analog_in_get_identity="def _bricklet_industrial_dual_analog_in_get_identity(host, port_ip, uid):\n  return _get_device(BrickletIndustrialDualAnalogIn, uid, _get_ipcon(host, port)).get_identity()";
return["_bricklet_industrial_dual_analog_in_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_quad_relay_set_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay="from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_set_value="def _bricklet_industrial_quad_relay_set_value(host, port_ip, uid, value_mask):\n  _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).set_value(value_mask)";
return"_bricklet_industrial_quad_relay_set_value("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_quad_relay_get_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay="from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_get_value="def _bricklet_industrial_quad_relay_get_value(host, port_ip, uid):\n  return _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).get_value()";
return["_bricklet_industrial_quad_relay_get_value("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_quad_relay_set_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);
a=Blockly.JavaScript.valueToCode(a,"TIME",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay=
"from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_set_monoflop="def _bricklet_industrial_quad_relay_set_monoflop(host, port_ip, uid, selection_mask, value_mask, time):\n  _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).set_monoflop(selection_mask, value_mask, time)";return"_bricklet_industrial_quad_relay_set_monoflop("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+
", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_quad_relay_get_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay="from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_get_monoflop="def _bricklet_industrial_quad_relay_get_monoflop(host, port_ip, uid, pin):\n  return _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).get_monoflop(pin)";
return["_bricklet_industrial_quad_relay_get_monoflop("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_quad_relay_set_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"GROUP",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay="from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_set_group="def _bricklet_industrial_quad_relay_set_group(host, port_ip, uid, group):\n  _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).set_group(group)";
return"_bricklet_industrial_quad_relay_set_group("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_quad_relay_get_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay="from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_get_group="def _bricklet_industrial_quad_relay_get_group(host, port_ip, uid):\n  return _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).get_group()";
return["_bricklet_industrial_quad_relay_get_group("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_quad_relay_get_available_for_group=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay="from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_get_available_for_group="def _bricklet_industrial_quad_relay_get_available_for_group(host, port_ip, uid):\n  return _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).get_available_for_group()";
return["_bricklet_industrial_quad_relay_get_available_for_group("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_industrial_quad_relay_set_selected_values=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay="from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_set_selected_values="def _bricklet_industrial_quad_relay_set_selected_values(host, port_ip, uid, selection_mask, value_mask):\n  _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).set_selected_values(selection_mask, value_mask)";
return"_bricklet_industrial_quad_relay_set_selected_values("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_industrial_quad_relay_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_industrial_quad_relay="from tinkerforge.bricklet_industrial_quad_relay import BrickletIndustrialQuadRelay";Blockly.Python.definitions_.bricklet_industrial_quad_relay_get_identity="def _bricklet_industrial_quad_relay_get_identity(host, port_ip, uid):\n  return _get_device(BrickletIndustrialQuadRelay, uid, _get_ipcon(host, port)).get_identity()";
return["_bricklet_industrial_quad_relay_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io16_set_port=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));a=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_set_port="def _bricklet_io16_set_port(host, port_ip, uid, port, value_mask):\n  _get_device(BrickletIO16, uid, _get_ipcon(host, port)).set_port(port, value_mask)";return"_bricklet_io16_set_port("+String(c)+", "+String(d)+", "+
String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_io16_get_port=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_get_port="def _bricklet_io16_get_port(host, port_ip, uid, port):\n  return _get_device(BrickletIO16, uid, _get_ipcon(host, port)).get_port(port)";return["_bricklet_io16_get_port("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+
")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io16_set_port_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC)),f=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC),
g=a.getFieldValue("DIRECTION");a=a.getFieldValue("VALUE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";
Blockly.Python.definitions_.bricklet_io16_set_port_configuration="def _bricklet_io16_set_port_configuration(host, port_ip, uid, port, selection_mask, direction, value):\n  _get_device(BrickletIO16, uid, _get_ipcon(host, port)).set_port_configuration(port, selection_mask, direction, value)";return"_bricklet_io16_set_port_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(a)+")\n"};
Blockly.Python.bricklet_io16_get_port_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_get_port_configuration="def _bricklet_io16_get_port_configuration(host, port_ip, uid, port):\n  return _get_device(BrickletIO16, uid, _get_ipcon(host, port)).get_port_configuration(port)";return["_bricklet_io16_get_port_configuration("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io16_set_port_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC)),f=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC),
g=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"TIME",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16=
"from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_set_port_monoflop="def _bricklet_io16_set_port_monoflop(host, port_ip, uid, port, selection_mask, value_mask, time):\n  _get_device(BrickletIO16, uid, _get_ipcon(host, port)).set_port_monoflop(port, selection_mask, value_mask, time)";return"_bricklet_io16_set_port_monoflop("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(a)+")\n"};
Blockly.Python.bricklet_io16_get_port_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC));a=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_get_port_monoflop="def _bricklet_io16_get_port_monoflop(host, port_ip, uid, port, pin):\n  return _get_device(BrickletIO16, uid, _get_ipcon(host, port)).get_port_monoflop(port, pin)";return["_bricklet_io16_get_port_monoflop("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io16_set_selected_values=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"PORT",Blockly.JavaScript.ORDER_ATOMIC)),f=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC);
a=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16=
"from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_set_selected_values="def _bricklet_io16_set_selected_values(host, port_ip, uid, port, selection_mask, value_mask):\n  _get_device(BrickletIO16, uid, _get_ipcon(host, port)).set_selected_values(port, selection_mask, value_mask)";return"_bricklet_io16_set_selected_values("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_io16_get_edge_count=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("RESET_COUNTER");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_get_edge_count="def _bricklet_io16_get_edge_count(host, port_ip, uid, pin, reset_counter):\n  return _get_device(BrickletIO16, uid, _get_ipcon(host, port)).get_edge_count(pin, reset_counter)";return["_bricklet_io16_get_edge_count("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io16_set_edge_count_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"DEBOUNCE",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("EDGE_TYPE");
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_set_edge_count_config="def _bricklet_io16_set_edge_count_config(host, port_ip, uid, pin, edge_type, debounce):\n  _get_device(BrickletIO16, uid, _get_ipcon(host, port)).set_edge_count_config(pin, edge_type, debounce)";return"_bricklet_io16_set_edge_count_config("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+", "+String(f)+")\n"};
Blockly.Python.bricklet_io16_get_edge_count_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_get_edge_count_config="def _bricklet_io16_get_edge_count_config(host, port_ip, uid, pin):\n  return _get_device(BrickletIO16, uid, _get_ipcon(host, port)).get_edge_count_config(pin)";return["_bricklet_io16_get_edge_count_config("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io16_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io16="from tinkerforge.bricklet_io16 import BrickletIO16";Blockly.Python.definitions_.bricklet_io16_get_identity="def _bricklet_io16_get_identity(host, port_ip, uid):\n  return _get_device(BrickletIO16, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_io16_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io4_set_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_set_value="def _bricklet_io4_set_value(host, port_ip, uid, value_mask):\n  _get_device(BrickletIO4, uid, _get_ipcon(host, port)).set_value(value_mask)";return"_bricklet_io4_set_value("+String(c)+", "+String(d)+", "+String(b)+", "+
String(a)+")\n"};
Blockly.Python.bricklet_io4_get_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4=
"from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_get_value="def _bricklet_io4_get_value(host, port_ip, uid):\n  return _get_device(BrickletIO4, uid, _get_ipcon(host, port)).get_value()";return["_bricklet_io4_get_value("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io4_set_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC),f=a.getFieldValue("DIRECTION");a=a.getFieldValue("VALUE");Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_set_configuration="def _bricklet_io4_set_configuration(host, port_ip, uid, selection_mask, direction, value):\n  _get_device(BrickletIO4, uid, _get_ipcon(host, port)).set_configuration(selection_mask, direction, value)";return"_bricklet_io4_set_configuration("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_io4_get_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_get_configuration="def _bricklet_io4_get_configuration(host, port_ip, uid):\n  return _get_device(BrickletIO4, uid, _get_ipcon(host, port)).get_configuration()";return["_bricklet_io4_get_configuration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io4_set_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,
"TIME",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";
Blockly.Python.definitions_.bricklet_io4_set_monoflop="def _bricklet_io4_set_monoflop(host, port_ip, uid, selection_mask, value_mask, time):\n  _get_device(BrickletIO4, uid, _get_ipcon(host, port)).set_monoflop(selection_mask, value_mask, time)";return"_bricklet_io4_set_monoflop("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_io4_get_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_get_monoflop="def _bricklet_io4_get_monoflop(host, port_ip, uid, pin):\n  return _get_device(BrickletIO4, uid, _get_ipcon(host, port)).get_monoflop(pin)";return["_bricklet_io4_get_monoflop("+String(c)+", "+String(d)+", "+String(b)+
", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io4_set_selected_values=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"VALUE_MASK",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_set_selected_values="def _bricklet_io4_set_selected_values(host, port_ip, uid, selection_mask, value_mask):\n  _get_device(BrickletIO4, uid, _get_ipcon(host, port)).set_selected_values(selection_mask, value_mask)";return"_bricklet_io4_set_selected_values("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_io4_get_edge_count=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("RESET_COUNTER");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_get_edge_count="def _bricklet_io4_get_edge_count(host, port_ip, uid, pin, reset_counter):\n  return _get_device(BrickletIO4, uid, _get_ipcon(host, port)).get_edge_count(pin, reset_counter)";return["_bricklet_io4_get_edge_count("+String(c)+
", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io4_set_edge_count_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SELECTION_MASK",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"DEBOUNCE",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("EDGE_TYPE");
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_set_edge_count_config="def _bricklet_io4_set_edge_count_config(host, port_ip, uid, selection_mask, edge_type, debounce):\n  _get_device(BrickletIO4, uid, _get_ipcon(host, port)).set_edge_count_config(selection_mask, edge_type, debounce)";
return"_bricklet_io4_set_edge_count_config("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+", "+String(f)+")\n"};
Blockly.Python.bricklet_io4_get_edge_count_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"PIN",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_get_edge_count_config="def _bricklet_io4_get_edge_count_config(host, port_ip, uid, pin):\n  return _get_device(BrickletIO4, uid, _get_ipcon(host, port)).get_edge_count_config(pin)";return["_bricklet_io4_get_edge_count_config("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_io4_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_io4="from tinkerforge.bricklet_io4 import BrickletIO4";Blockly.Python.definitions_.bricklet_io4_get_identity="def _bricklet_io4_get_identity(host, port_ip, uid):\n  return _get_device(BrickletIO4, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_io4_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_joystick_get_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_joystick="from tinkerforge.bricklet_joystick import BrickletJoystick";Blockly.Python.definitions_.bricklet_joystick_get_position="def _bricklet_joystick_get_position(host, port_ip, uid):\n  return _get_device(BrickletJoystick, uid, _get_ipcon(host, port)).get_position()";return["_bricklet_joystick_get_position("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_joystick_is_pressed=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_joystick="from tinkerforge.bricklet_joystick import BrickletJoystick";Blockly.Python.definitions_.bricklet_joystick_is_pressed="def _bricklet_joystick_is_pressed(host, port_ip, uid):\n  return _get_device(BrickletJoystick, uid, _get_ipcon(host, port)).is_pressed()";return["_bricklet_joystick_is_pressed("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_joystick_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_joystick="from tinkerforge.bricklet_joystick import BrickletJoystick";Blockly.Python.definitions_.bricklet_joystick_get_analog_value="def _bricklet_joystick_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletJoystick, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_joystick_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_joystick_calibrate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_joystick="from tinkerforge.bricklet_joystick import BrickletJoystick";Blockly.Python.definitions_.bricklet_joystick_calibrate="def _bricklet_joystick_calibrate(host, port_ip, uid):\n  _get_device(BrickletJoystick, uid, _get_ipcon(host, port)).calibrate()";return"_bricklet_joystick_calibrate("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_joystick_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_joystick="from tinkerforge.bricklet_joystick import BrickletJoystick";Blockly.Python.definitions_.bricklet_joystick_get_identity="def _bricklet_joystick_get_identity(host, port_ip, uid):\n  return _get_device(BrickletJoystick, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_joystick_get_identity("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_laser_range_finder_get_distance=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_get_distance="def _bricklet_laser_range_finder_get_distance(host, port_ip, uid):\n  return _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).get_distance()";
return["_bricklet_laser_range_finder_get_distance("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_laser_range_finder_get_velocity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_get_velocity="def _bricklet_laser_range_finder_get_velocity(host, port_ip, uid):\n  return _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).get_velocity()";
return["_bricklet_laser_range_finder_get_velocity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_laser_range_finder_set_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"DISTANCE_AVERAGE_LENGTH",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"VELOCITY_AVERAGE_LENGTH",Blockly.JavaScript.ORDER_ATOMIC);
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_set_moving_average="def _bricklet_laser_range_finder_set_moving_average(host, port_ip, uid, distance_average_length, velocity_average_length):\n  _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).set_moving_average(distance_average_length, velocity_average_length)";
return"_bricklet_laser_range_finder_set_moving_average("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_laser_range_finder_get_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_get_moving_average="def _bricklet_laser_range_finder_get_moving_average(host, port_ip, uid):\n  return _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).get_moving_average()";
return["_bricklet_laser_range_finder_get_moving_average("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_laser_range_finder_set_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("MODE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_set_mode="def _bricklet_laser_range_finder_set_mode(host, port_ip, uid, mode):\n  _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).set_mode(mode)";return"_bricklet_laser_range_finder_set_mode("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_laser_range_finder_get_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_get_mode="def _bricklet_laser_range_finder_get_mode(host, port_ip, uid):\n  return _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).get_mode()";return["_bricklet_laser_range_finder_get_mode("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_laser_range_finder_enable_laser=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_enable_laser="def _bricklet_laser_range_finder_enable_laser(host, port_ip, uid):\n  _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).enable_laser()";return"_bricklet_laser_range_finder_enable_laser("+
c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_laser_range_finder_disable_laser=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_disable_laser="def _bricklet_laser_range_finder_disable_laser(host, port_ip, uid):\n  _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).disable_laser()";return"_bricklet_laser_range_finder_disable_laser("+
c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_laser_range_finder_is_laser_enabled=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_is_laser_enabled="def _bricklet_laser_range_finder_is_laser_enabled(host, port_ip, uid):\n  return _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).is_laser_enabled()";
return["_bricklet_laser_range_finder_is_laser_enabled("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_laser_range_finder_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_laser_range_finder="from tinkerforge.bricklet_laser_range_finder import BrickletLaserRangeFinder";Blockly.Python.definitions_.bricklet_laser_range_finder_get_identity="def _bricklet_laser_range_finder_get_identity(host, port_ip, uid):\n  return _get_device(BrickletLaserRangeFinder, uid, _get_ipcon(host, port)).get_identity()";
return["_bricklet_laser_range_finder_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_16x2_write_line=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"LINE",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,
"TEXT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";
Blockly.Python.definitions_.bricklet_lcd_16x2_write_line="def _bricklet_lcd_16x2_write_line(host, port_ip, uid, line, position, text):\n  _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).write_line(line, position, text)";return"_bricklet_lcd_16x2_write_line("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_lcd_16x2_clear_display=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_clear_display="def _bricklet_lcd_16x2_clear_display(host, port_ip, uid):\n  _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).clear_display()";return"_bricklet_lcd_16x2_clear_display("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_lcd_16x2_backlight_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_backlight_on="def _bricklet_lcd_16x2_backlight_on(host, port_ip, uid):\n  _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).backlight_on()";return"_bricklet_lcd_16x2_backlight_on("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_lcd_16x2_backlight_off=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_backlight_off="def _bricklet_lcd_16x2_backlight_off(host, port_ip, uid):\n  _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).backlight_off()";return"_bricklet_lcd_16x2_backlight_off("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_lcd_16x2_is_backlight_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_is_backlight_on="def _bricklet_lcd_16x2_is_backlight_on(host, port_ip, uid):\n  return _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).is_backlight_on()";return["_bricklet_lcd_16x2_is_backlight_on("+c+
", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_16x2_set_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("CURSOR");a=a.getFieldValue("BLINKING");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_set_config="def _bricklet_lcd_16x2_set_config(host, port_ip, uid, cursor, blinking):\n  _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).set_config(cursor, blinking)";return"_bricklet_lcd_16x2_set_config("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_lcd_16x2_get_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_get_config="def _bricklet_lcd_16x2_get_config(host, port_ip, uid):\n  return _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).get_config()";return["_bricklet_lcd_16x2_get_config("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_16x2_is_button_pressed=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"BUTTON",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_is_button_pressed="def _bricklet_lcd_16x2_is_button_pressed(host, port_ip, uid, button):\n  return _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).is_button_pressed(button)";return["_bricklet_lcd_16x2_is_button_pressed("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_16x2_set_custom_character=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"INDEX",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"CHARACTER",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_set_custom_character="def _bricklet_lcd_16x2_set_custom_character(host, port_ip, uid, index, character):\n  _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).set_custom_character(index, character)";return"_bricklet_lcd_16x2_set_custom_character("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_lcd_16x2_get_custom_character=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"INDEX",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_get_custom_character="def _bricklet_lcd_16x2_get_custom_character(host, port_ip, uid, index):\n  return _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).get_custom_character(index)";return["_bricklet_lcd_16x2_get_custom_character("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_16x2_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_16x2="from tinkerforge.bricklet_lcd_16x2 import BrickletLCD16x2";Blockly.Python.definitions_.bricklet_lcd_16x2_get_identity="def _bricklet_lcd_16x2_get_identity(host, port_ip, uid):\n  return _get_device(BrickletLCD16x2, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_lcd_16x2_get_identity("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_20x4_write_line=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"LINE",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,
"TEXT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";
Blockly.Python.definitions_.bricklet_lcd_20x4_write_line="def _bricklet_lcd_20x4_write_line(host, port_ip, uid, line, position, text):\n  _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).write_line(line, position, text)";return"_bricklet_lcd_20x4_write_line("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_lcd_20x4_clear_display=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_clear_display="def _bricklet_lcd_20x4_clear_display(host, port_ip, uid):\n  _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).clear_display()";return"_bricklet_lcd_20x4_clear_display("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_lcd_20x4_backlight_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_backlight_on="def _bricklet_lcd_20x4_backlight_on(host, port_ip, uid):\n  _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).backlight_on()";return"_bricklet_lcd_20x4_backlight_on("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_lcd_20x4_backlight_off=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_backlight_off="def _bricklet_lcd_20x4_backlight_off(host, port_ip, uid):\n  _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).backlight_off()";return"_bricklet_lcd_20x4_backlight_off("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_lcd_20x4_is_backlight_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_is_backlight_on="def _bricklet_lcd_20x4_is_backlight_on(host, port_ip, uid):\n  return _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).is_backlight_on()";return["_bricklet_lcd_20x4_is_backlight_on("+c+
", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_20x4_set_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("CURSOR");a=a.getFieldValue("BLINKING");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_set_config="def _bricklet_lcd_20x4_set_config(host, port_ip, uid, cursor, blinking):\n  _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).set_config(cursor, blinking)";return"_bricklet_lcd_20x4_set_config("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_lcd_20x4_get_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_get_config="def _bricklet_lcd_20x4_get_config(host, port_ip, uid):\n  return _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).get_config()";return["_bricklet_lcd_20x4_get_config("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_20x4_is_button_pressed=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"BUTTON",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_is_button_pressed="def _bricklet_lcd_20x4_is_button_pressed(host, port_ip, uid, button):\n  return _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).is_button_pressed(button)";return["_bricklet_lcd_20x4_is_button_pressed("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_20x4_set_custom_character=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"INDEX",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"CHARACTER",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_set_custom_character="def _bricklet_lcd_20x4_set_custom_character(host, port_ip, uid, index, character):\n  _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).set_custom_character(index, character)";return"_bricklet_lcd_20x4_set_custom_character("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_lcd_20x4_get_custom_character=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"INDEX",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_get_custom_character="def _bricklet_lcd_20x4_get_custom_character(host, port_ip, uid, index):\n  return _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).get_custom_character(index)";return["_bricklet_lcd_20x4_get_custom_character("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_20x4_set_default_text=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"LINE",Blockly.JavaScript.ORDER_ATOMIC);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_set_default_text="def _bricklet_lcd_20x4_set_default_text(host, port_ip, uid, line, text):\n  _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).set_default_text(line, text)";return"_bricklet_lcd_20x4_set_default_text("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_lcd_20x4_get_default_text=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"LINE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_get_default_text="def _bricklet_lcd_20x4_get_default_text(host, port_ip, uid, line):\n  return _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).get_default_text(line)";return["_bricklet_lcd_20x4_get_default_text("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_20x4_set_default_text_counter=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"COUNTER",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_set_default_text_counter="def _bricklet_lcd_20x4_set_default_text_counter(host, port_ip, uid, counter):\n  _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).set_default_text_counter(counter)";return"_bricklet_lcd_20x4_set_default_text_counter("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_lcd_20x4_get_default_text_counter=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_get_default_text_counter="def _bricklet_lcd_20x4_get_default_text_counter(host, port_ip, uid):\n  return _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).get_default_text_counter()";return["_bricklet_lcd_20x4_get_default_text_counter("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_lcd_20x4_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_lcd_20x4="from tinkerforge.bricklet_lcd_20x4 import BrickletLCD20x4";Blockly.Python.definitions_.bricklet_lcd_20x4_get_identity="def _bricklet_lcd_20x4_get_identity(host, port_ip, uid):\n  return _get_device(BrickletLCD20x4, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_lcd_20x4_get_identity("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_led_strip_set_rgb_values=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"INDEX",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"LENGTH",Blockly.JavaScript.ORDER_ATOMIC),g=Blockly.JavaScript.valueToCode(a,
"R",Blockly.JavaScript.ORDER_ATOMIC),h=Blockly.JavaScript.valueToCode(a,"G",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"B",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip=
"from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_set_rgb_values="def _bricklet_led_strip_set_rgb_values(host, port_ip, uid, index, length, r, g, b):\n  _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).set_rgb_values(index, length, r, g, b)";return"_bricklet_led_strip_set_rgb_values("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(h)+", "+String(a)+")\n"};
Blockly.Python.bricklet_led_strip_get_rgb_values=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"INDEX",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"LENGTH",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_get_rgb_values="def _bricklet_led_strip_get_rgb_values(host, port_ip, uid, index, length):\n  return _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).get_rgb_values(index, length)";return["_bricklet_led_strip_get_rgb_values("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_led_strip_set_frame_duration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"DURATION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_set_frame_duration="def _bricklet_led_strip_set_frame_duration(host, port_ip, uid, duration):\n  _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).set_frame_duration(duration)";return"_bricklet_led_strip_set_frame_duration("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_led_strip_get_frame_duration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_get_frame_duration="def _bricklet_led_strip_get_frame_duration(host, port_ip, uid):\n  return _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).get_frame_duration()";return["_bricklet_led_strip_get_frame_duration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_led_strip_get_supply_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_get_supply_voltage="def _bricklet_led_strip_get_supply_voltage(host, port_ip, uid):\n  return _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).get_supply_voltage()";return["_bricklet_led_strip_get_supply_voltage("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_led_strip_set_clock_frequency=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"FREQUENCY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_set_clock_frequency="def _bricklet_led_strip_set_clock_frequency(host, port_ip, uid, frequency):\n  _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).set_clock_frequency(frequency)";return"_bricklet_led_strip_set_clock_frequency("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_led_strip_get_clock_frequency=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_get_clock_frequency="def _bricklet_led_strip_get_clock_frequency(host, port_ip, uid):\n  return _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).get_clock_frequency()";return["_bricklet_led_strip_get_clock_frequency("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_led_strip_set_chip_type=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("CHIP");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_set_chip_type="def _bricklet_led_strip_set_chip_type(host, port_ip, uid, chip):\n  _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).set_chip_type(chip)";return"_bricklet_led_strip_set_chip_type("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_led_strip_get_chip_type=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_get_chip_type="def _bricklet_led_strip_get_chip_type(host, port_ip, uid):\n  return _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).get_chip_type()";return["_bricklet_led_strip_get_chip_type("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_led_strip_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_led_strip="from tinkerforge.bricklet_led_strip import BrickletLEDStrip";Blockly.Python.definitions_.bricklet_led_strip_get_identity="def _bricklet_led_strip_get_identity(host, port_ip, uid):\n  return _get_device(BrickletLEDStrip, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_led_strip_get_identity("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_line_get_reflectivity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_line="from tinkerforge.bricklet_line import BrickletLine";Blockly.Python.definitions_.bricklet_line_get_reflectivity="def _bricklet_line_get_reflectivity(host, port_ip, uid):\n  return _get_device(BrickletLine, uid, _get_ipcon(host, port)).get_reflectivity()";return["_bricklet_line_get_reflectivity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_line_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_line="from tinkerforge.bricklet_line import BrickletLine";Blockly.Python.definitions_.bricklet_line_get_identity="def _bricklet_line_get_identity(host, port_ip, uid):\n  return _get_device(BrickletLine, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_line_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_linear_poti_get_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_linear_poti="from tinkerforge.bricklet_linear_poti import BrickletLinearPoti";Blockly.Python.definitions_.bricklet_linear_poti_get_position="def _bricklet_linear_poti_get_position(host, port_ip, uid):\n  return _get_device(BrickletLinearPoti, uid, _get_ipcon(host, port)).get_position()";return["_bricklet_linear_poti_get_position("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_linear_poti_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_linear_poti="from tinkerforge.bricklet_linear_poti import BrickletLinearPoti";Blockly.Python.definitions_.bricklet_linear_poti_get_analog_value="def _bricklet_linear_poti_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletLinearPoti, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_linear_poti_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_linear_poti_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_linear_poti="from tinkerforge.bricklet_linear_poti import BrickletLinearPoti";Blockly.Python.definitions_.bricklet_linear_poti_get_identity="def _bricklet_linear_poti_get_identity(host, port_ip, uid):\n  return _get_device(BrickletLinearPoti, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_linear_poti_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_load_cell_get_weight=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_get_weight="def _bricklet_load_cell_get_weight(host, port_ip, uid):\n  return _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).get_weight()";return["_bricklet_load_cell_get_weight("+c+", "+a+", "+b+
")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_load_cell_set_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"AVERAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_set_moving_average="def _bricklet_load_cell_set_moving_average(host, port_ip, uid, average):\n  _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).set_moving_average(average)";return"_bricklet_load_cell_set_moving_average("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_load_cell_get_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_get_moving_average="def _bricklet_load_cell_get_moving_average(host, port_ip, uid):\n  return _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).get_moving_average()";return["_bricklet_load_cell_get_moving_average("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_load_cell_led_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_led_on="def _bricklet_load_cell_led_on(host, port_ip, uid):\n  _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).led_on()";return"_bricklet_load_cell_led_on("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_load_cell_led_off=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_led_off="def _bricklet_load_cell_led_off(host, port_ip, uid):\n  _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).led_off()";return"_bricklet_load_cell_led_off("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_load_cell_is_led_on=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_is_led_on="def _bricklet_load_cell_is_led_on(host, port_ip, uid):\n  return _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).is_led_on()";return["_bricklet_load_cell_is_led_on("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_load_cell_calibrate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"WEIGHT",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_calibrate="def _bricklet_load_cell_calibrate(host, port_ip, uid, weight):\n  _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).calibrate(weight)";return"_bricklet_load_cell_calibrate("+String(c)+", "+
String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_load_cell_tare=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_tare="def _bricklet_load_cell_tare(host, port_ip, uid):\n  _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).tare()";return"_bricklet_load_cell_tare("+c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_load_cell_set_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("RATE");a=a.getFieldValue("GAIN");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_set_configuration="def _bricklet_load_cell_set_configuration(host, port_ip, uid, rate, gain):\n  _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).set_configuration(rate, gain)";return"_bricklet_load_cell_set_configuration("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_load_cell_get_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_get_configuration="def _bricklet_load_cell_get_configuration(host, port_ip, uid):\n  return _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).get_configuration()";return["_bricklet_load_cell_get_configuration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_load_cell_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_load_cell="from tinkerforge.bricklet_load_cell import BrickletLoadCell";Blockly.Python.definitions_.bricklet_load_cell_get_identity="def _bricklet_load_cell_get_identity(host, port_ip, uid):\n  return _get_device(BrickletLoadCell, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_load_cell_get_identity("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_moisture_get_moisture_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_moisture="from tinkerforge.bricklet_moisture import BrickletMoisture";Blockly.Python.definitions_.bricklet_moisture_get_moisture_value="def _bricklet_moisture_get_moisture_value(host, port_ip, uid):\n  return _get_device(BrickletMoisture, uid, _get_ipcon(host, port)).get_moisture_value()";return["_bricklet_moisture_get_moisture_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_moisture_set_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"AVERAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_moisture="from tinkerforge.bricklet_moisture import BrickletMoisture";Blockly.Python.definitions_.bricklet_moisture_set_moving_average="def _bricklet_moisture_set_moving_average(host, port_ip, uid, average):\n  _get_device(BrickletMoisture, uid, _get_ipcon(host, port)).set_moving_average(average)";return"_bricklet_moisture_set_moving_average("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_moisture_get_moving_average=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_moisture="from tinkerforge.bricklet_moisture import BrickletMoisture";Blockly.Python.definitions_.bricklet_moisture_get_moving_average="def _bricklet_moisture_get_moving_average(host, port_ip, uid):\n  return _get_device(BrickletMoisture, uid, _get_ipcon(host, port)).get_moving_average()";return["_bricklet_moisture_get_moving_average("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_moisture_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_moisture="from tinkerforge.bricklet_moisture import BrickletMoisture";Blockly.Python.definitions_.bricklet_moisture_get_identity="def _bricklet_moisture_get_identity(host, port_ip, uid):\n  return _get_device(BrickletMoisture, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_moisture_get_identity("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_motion_detector_get_motion_detected=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_motion_detector="from tinkerforge.bricklet_motion_detector import BrickletMotionDetector";Blockly.Python.definitions_.bricklet_motion_detector_get_motion_detected="def _bricklet_motion_detector_get_motion_detected(host, port_ip, uid):\n  return _get_device(BrickletMotionDetector, uid, _get_ipcon(host, port)).get_motion_detected()";
return["_bricklet_motion_detector_get_motion_detected("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_motion_detector_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_motion_detector="from tinkerforge.bricklet_motion_detector import BrickletMotionDetector";Blockly.Python.definitions_.bricklet_motion_detector_get_identity="def _bricklet_motion_detector_get_identity(host, port_ip, uid):\n  return _get_device(BrickletMotionDetector, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_motion_detector_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_multi_touch_get_touch_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_multi_touch="from tinkerforge.bricklet_multi_touch import BrickletMultiTouch";Blockly.Python.definitions_.bricklet_multi_touch_get_touch_state="def _bricklet_multi_touch_get_touch_state(host, port_ip, uid):\n  return _get_device(BrickletMultiTouch, uid, _get_ipcon(host, port)).get_touch_state()";return["_bricklet_multi_touch_get_touch_state("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_multi_touch_recalibrate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_multi_touch="from tinkerforge.bricklet_multi_touch import BrickletMultiTouch";Blockly.Python.definitions_.bricklet_multi_touch_recalibrate="def _bricklet_multi_touch_recalibrate(host, port_ip, uid):\n  _get_device(BrickletMultiTouch, uid, _get_ipcon(host, port)).recalibrate()";return"_bricklet_multi_touch_recalibrate("+c+", "+
a+", "+b+")\n"};
Blockly.Python.bricklet_multi_touch_set_electrode_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"ENABLED_ELECTRODES",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_multi_touch="from tinkerforge.bricklet_multi_touch import BrickletMultiTouch";Blockly.Python.definitions_.bricklet_multi_touch_set_electrode_config="def _bricklet_multi_touch_set_electrode_config(host, port_ip, uid, enabled_electrodes):\n  _get_device(BrickletMultiTouch, uid, _get_ipcon(host, port)).set_electrode_config(enabled_electrodes)";
return"_bricklet_multi_touch_set_electrode_config("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_multi_touch_get_electrode_config=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_multi_touch="from tinkerforge.bricklet_multi_touch import BrickletMultiTouch";Blockly.Python.definitions_.bricklet_multi_touch_get_electrode_config="def _bricklet_multi_touch_get_electrode_config(host, port_ip, uid):\n  return _get_device(BrickletMultiTouch, uid, _get_ipcon(host, port)).get_electrode_config()";return["_bricklet_multi_touch_get_electrode_config("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_multi_touch_set_electrode_sensitivity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"SENSITIVITY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_multi_touch="from tinkerforge.bricklet_multi_touch import BrickletMultiTouch";Blockly.Python.definitions_.bricklet_multi_touch_set_electrode_sensitivity="def _bricklet_multi_touch_set_electrode_sensitivity(host, port_ip, uid, sensitivity):\n  _get_device(BrickletMultiTouch, uid, _get_ipcon(host, port)).set_electrode_sensitivity(sensitivity)";
return"_bricklet_multi_touch_set_electrode_sensitivity("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_multi_touch_get_electrode_sensitivity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_multi_touch="from tinkerforge.bricklet_multi_touch import BrickletMultiTouch";Blockly.Python.definitions_.bricklet_multi_touch_get_electrode_sensitivity="def _bricklet_multi_touch_get_electrode_sensitivity(host, port_ip, uid):\n  return _get_device(BrickletMultiTouch, uid, _get_ipcon(host, port)).get_electrode_sensitivity()";
return["_bricklet_multi_touch_get_electrode_sensitivity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_multi_touch_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_multi_touch="from tinkerforge.bricklet_multi_touch import BrickletMultiTouch";Blockly.Python.definitions_.bricklet_multi_touch_get_identity="def _bricklet_multi_touch_get_identity(host, port_ip, uid):\n  return _get_device(BrickletMultiTouch, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_multi_touch_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_nfc_rfid_request_tag_id=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("TAG_TYPE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_nfc_rfid="from tinkerforge.bricklet_nfc_rfid import BrickletNFCRFID";Blockly.Python.definitions_.bricklet_nfc_rfid_request_tag_id="def _bricklet_nfc_rfid_request_tag_id(host, port_ip, uid, tag_type):\n  _get_device(BrickletNFCRFID, uid, _get_ipcon(host, port)).request_tag_id(tag_type)";return"_bricklet_nfc_rfid_request_tag_id("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_nfc_rfid_get_tag_id=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_nfc_rfid="from tinkerforge.bricklet_nfc_rfid import BrickletNFCRFID";Blockly.Python.definitions_.bricklet_nfc_rfid_get_tag_id="def _bricklet_nfc_rfid_get_tag_id(host, port_ip, uid):\n  return _get_device(BrickletNFCRFID, uid, _get_ipcon(host, port)).get_tag_id()";return["_bricklet_nfc_rfid_get_tag_id("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_nfc_rfid_get_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_nfc_rfid="from tinkerforge.bricklet_nfc_rfid import BrickletNFCRFID";Blockly.Python.definitions_.bricklet_nfc_rfid_get_state="def _bricklet_nfc_rfid_get_state(host, port_ip, uid):\n  return _get_device(BrickletNFCRFID, uid, _get_ipcon(host, port)).get_state()";return["_bricklet_nfc_rfid_get_state("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_nfc_rfid_authenticate_mifare_classic_page=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"PAGE",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"KEY",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("KEY_NUMBER");
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_nfc_rfid="from tinkerforge.bricklet_nfc_rfid import BrickletNFCRFID";Blockly.Python.definitions_.bricklet_nfc_rfid_authenticate_mifare_classic_page="def _bricklet_nfc_rfid_authenticate_mifare_classic_page(host, port_ip, uid, page, key_number, key):\n  _get_device(BrickletNFCRFID, uid, _get_ipcon(host, port)).authenticate_mifare_classic_page(page, key_number, key)";
return"_bricklet_nfc_rfid_authenticate_mifare_classic_page("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+", "+String(f)+")\n"};
Blockly.Python.bricklet_nfc_rfid_write_page=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"PAGE",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"DATA",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_nfc_rfid="from tinkerforge.bricklet_nfc_rfid import BrickletNFCRFID";Blockly.Python.definitions_.bricklet_nfc_rfid_write_page="def _bricklet_nfc_rfid_write_page(host, port_ip, uid, page, data):\n  _get_device(BrickletNFCRFID, uid, _get_ipcon(host, port)).write_page(page, data)";return"_bricklet_nfc_rfid_write_page("+String(c)+
", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_nfc_rfid_request_page=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"PAGE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_nfc_rfid="from tinkerforge.bricklet_nfc_rfid import BrickletNFCRFID";Blockly.Python.definitions_.bricklet_nfc_rfid_request_page="def _bricklet_nfc_rfid_request_page(host, port_ip, uid, page):\n  _get_device(BrickletNFCRFID, uid, _get_ipcon(host, port)).request_page(page)";return"_bricklet_nfc_rfid_request_page("+String(c)+", "+
String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_nfc_rfid_get_page=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_nfc_rfid="from tinkerforge.bricklet_nfc_rfid import BrickletNFCRFID";Blockly.Python.definitions_.bricklet_nfc_rfid_get_page="def _bricklet_nfc_rfid_get_page(host, port_ip, uid):\n  return _get_device(BrickletNFCRFID, uid, _get_ipcon(host, port)).get_page()";return["_bricklet_nfc_rfid_get_page("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_nfc_rfid_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_nfc_rfid="from tinkerforge.bricklet_nfc_rfid import BrickletNFCRFID";Blockly.Python.definitions_.bricklet_nfc_rfid_get_identity="def _bricklet_nfc_rfid_get_identity(host, port_ip, uid):\n  return _get_device(BrickletNFCRFID, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_nfc_rfid_get_identity("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_oled_128x64_write=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"DATA",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_128x64="from tinkerforge.bricklet_oled_128x64 import BrickletOLED128x64";Blockly.Python.definitions_.bricklet_oled_128x64_write="def _bricklet_oled_128x64_write(host, port_ip, uid, data):\n  _get_device(BrickletOLED128x64, uid, _get_ipcon(host, port)).write(data)";return"_bricklet_oled_128x64_write("+String(c)+", "+String(d)+
", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_oled_128x64_new_window=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"COLUMN_FROM",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"COLUMN_TO",Blockly.JavaScript.ORDER_ATOMIC),g=Blockly.JavaScript.valueToCode(a,
"ROW_FROM",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"ROW_TO",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_128x64=
"from tinkerforge.bricklet_oled_128x64 import BrickletOLED128x64";Blockly.Python.definitions_.bricklet_oled_128x64_new_window="def _bricklet_oled_128x64_new_window(host, port_ip, uid, column_from, column_to, row_from, row_to):\n  _get_device(BrickletOLED128x64, uid, _get_ipcon(host, port)).new_window(column_from, column_to, row_from, row_to)";return"_bricklet_oled_128x64_new_window("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(a)+")\n"};
Blockly.Python.bricklet_oled_128x64_clear_display=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_128x64="from tinkerforge.bricklet_oled_128x64 import BrickletOLED128x64";Blockly.Python.definitions_.bricklet_oled_128x64_clear_display="def _bricklet_oled_128x64_clear_display(host, port_ip, uid):\n  _get_device(BrickletOLED128x64, uid, _get_ipcon(host, port)).clear_display()";return"_bricklet_oled_128x64_clear_display("+
c+", "+a+", "+b+")\n"};
Blockly.Python.bricklet_oled_128x64_set_display_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"CONTRAST",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("INVERT");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_128x64="from tinkerforge.bricklet_oled_128x64 import BrickletOLED128x64";Blockly.Python.definitions_.bricklet_oled_128x64_set_display_configuration="def _bricklet_oled_128x64_set_display_configuration(host, port_ip, uid, contrast, invert):\n  _get_device(BrickletOLED128x64, uid, _get_ipcon(host, port)).set_display_configuration(contrast, invert)";
return"_bricklet_oled_128x64_set_display_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_oled_128x64_get_display_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_128x64="from tinkerforge.bricklet_oled_128x64 import BrickletOLED128x64";Blockly.Python.definitions_.bricklet_oled_128x64_get_display_configuration="def _bricklet_oled_128x64_get_display_configuration(host, port_ip, uid):\n  return _get_device(BrickletOLED128x64, uid, _get_ipcon(host, port)).get_display_configuration()";
return["_bricklet_oled_128x64_get_display_configuration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_oled_128x64_write_line=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"LINE",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,
"TEXT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_128x64="from tinkerforge.bricklet_oled_128x64 import BrickletOLED128x64";
Blockly.Python.definitions_.bricklet_oled_128x64_write_line="def _bricklet_oled_128x64_write_line(host, port_ip, uid, line, position, text):\n  _get_device(BrickletOLED128x64, uid, _get_ipcon(host, port)).write_line(line, position, text)";return"_bricklet_oled_128x64_write_line("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_oled_128x64_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_128x64="from tinkerforge.bricklet_oled_128x64 import BrickletOLED128x64";Blockly.Python.definitions_.bricklet_oled_128x64_get_identity="def _bricklet_oled_128x64_get_identity(host, port_ip, uid):\n  return _get_device(BrickletOLED128x64, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_oled_128x64_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_oled_64x48_write=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"DATA",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_64x48="from tinkerforge.bricklet_oled_64x48 import BrickletOLED64x48";Blockly.Python.definitions_.bricklet_oled_64x48_write="def _bricklet_oled_64x48_write(host, port_ip, uid, data):\n  _get_device(BrickletOLED64x48, uid, _get_ipcon(host, port)).write(data)";return"_bricklet_oled_64x48_write("+String(c)+", "+String(d)+", "+
String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_oled_64x48_new_window=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"COLUMN_FROM",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"COLUMN_TO",Blockly.JavaScript.ORDER_ATOMIC),g=Blockly.JavaScript.valueToCode(a,
"ROW_FROM",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"ROW_TO",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_64x48=
"from tinkerforge.bricklet_oled_64x48 import BrickletOLED64x48";Blockly.Python.definitions_.bricklet_oled_64x48_new_window="def _bricklet_oled_64x48_new_window(host, port_ip, uid, column_from, column_to, row_from, row_to):\n  _get_device(BrickletOLED64x48, uid, _get_ipcon(host, port)).new_window(column_from, column_to, row_from, row_to)";return"_bricklet_oled_64x48_new_window("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(a)+")\n"};
Blockly.Python.bricklet_oled_64x48_clear_display=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_64x48="from tinkerforge.bricklet_oled_64x48 import BrickletOLED64x48";Blockly.Python.definitions_.bricklet_oled_64x48_clear_display="def _bricklet_oled_64x48_clear_display(host, port_ip, uid):\n  _get_device(BrickletOLED64x48, uid, _get_ipcon(host, port)).clear_display()";return"_bricklet_oled_64x48_clear_display("+c+", "+
a+", "+b+")\n"};
Blockly.Python.bricklet_oled_64x48_set_display_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"CONTRAST",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("INVERT");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_64x48="from tinkerforge.bricklet_oled_64x48 import BrickletOLED64x48";Blockly.Python.definitions_.bricklet_oled_64x48_set_display_configuration="def _bricklet_oled_64x48_set_display_configuration(host, port_ip, uid, contrast, invert):\n  _get_device(BrickletOLED64x48, uid, _get_ipcon(host, port)).set_display_configuration(contrast, invert)";
return"_bricklet_oled_64x48_set_display_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_oled_64x48_get_display_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_64x48="from tinkerforge.bricklet_oled_64x48 import BrickletOLED64x48";Blockly.Python.definitions_.bricklet_oled_64x48_get_display_configuration="def _bricklet_oled_64x48_get_display_configuration(host, port_ip, uid):\n  return _get_device(BrickletOLED64x48, uid, _get_ipcon(host, port)).get_display_configuration()";return["_bricklet_oled_64x48_get_display_configuration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_oled_64x48_write_line=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"LINE",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"POSITION",Blockly.JavaScript.ORDER_ATOMIC);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,
"TEXT",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_64x48="from tinkerforge.bricklet_oled_64x48 import BrickletOLED64x48";
Blockly.Python.definitions_.bricklet_oled_64x48_write_line="def _bricklet_oled_64x48_write_line(host, port_ip, uid, line, position, text):\n  _get_device(BrickletOLED64x48, uid, _get_ipcon(host, port)).write_line(line, position, text)";return"_bricklet_oled_64x48_write_line("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_oled_64x48_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_oled_64x48="from tinkerforge.bricklet_oled_64x48 import BrickletOLED64x48";Blockly.Python.definitions_.bricklet_oled_64x48_get_identity="def _bricklet_oled_64x48_get_identity(host, port_ip, uid):\n  return _get_device(BrickletOLED64x48, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_oled_64x48_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_piezo_buzzer_beep=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"DURATION",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_piezo_buzzer="from tinkerforge.bricklet_piezo_buzzer import BrickletPiezoBuzzer";Blockly.Python.definitions_.bricklet_piezo_buzzer_beep="def _bricklet_piezo_buzzer_beep(host, port_ip, uid, duration):\n  _get_device(BrickletPiezoBuzzer, uid, _get_ipcon(host, port)).beep(duration)";return"_bricklet_piezo_buzzer_beep("+String(c)+
", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_piezo_buzzer_morse_code=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=JSON.stringify(Blockly.JavaScript.valueToCode(a,"MORSE",Blockly.JavaScript.ORDER_ATOMIC));Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_piezo_buzzer="from tinkerforge.bricklet_piezo_buzzer import BrickletPiezoBuzzer";Blockly.Python.definitions_.bricklet_piezo_buzzer_morse_code="def _bricklet_piezo_buzzer_morse_code(host, port_ip, uid, morse):\n  _get_device(BrickletPiezoBuzzer, uid, _get_ipcon(host, port)).morse_code(morse)";return"_bricklet_piezo_buzzer_morse_code("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_piezo_buzzer_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_piezo_buzzer="from tinkerforge.bricklet_piezo_buzzer import BrickletPiezoBuzzer";Blockly.Python.definitions_.bricklet_piezo_buzzer_get_identity="def _bricklet_piezo_buzzer_get_identity(host, port_ip, uid):\n  return _get_device(BrickletPiezoBuzzer, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_piezo_buzzer_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_piezo_speaker_beep=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"FREQUENCY",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("DURATION");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_piezo_speaker="from tinkerforge.bricklet_piezo_speaker import BrickletPiezoSpeaker";Blockly.Python.definitions_.bricklet_piezo_speaker_beep="def _bricklet_piezo_speaker_beep(host, port_ip, uid, duration, frequency):\n  _get_device(BrickletPiezoSpeaker, uid, _get_ipcon(host, port)).beep(duration, frequency)";return"_bricklet_piezo_speaker_beep("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+", "+String(e)+")\n"};
Blockly.Python.bricklet_piezo_speaker_morse_code=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"MORSE",Blockly.JavaScript.ORDER_ATOMIC));a=Blockly.JavaScript.valueToCode(a,"FREQUENCY",Blockly.JavaScript.ORDER_ATOMIC);
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_piezo_speaker="from tinkerforge.bricklet_piezo_speaker import BrickletPiezoSpeaker";Blockly.Python.definitions_.bricklet_piezo_speaker_morse_code="def _bricklet_piezo_speaker_morse_code(host, port_ip, uid, morse, frequency):\n  _get_device(BrickletPiezoSpeaker, uid, _get_ipcon(host, port)).morse_code(morse, frequency)";return"_bricklet_piezo_speaker_morse_code("+
String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_piezo_speaker_calibrate=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_piezo_speaker="from tinkerforge.bricklet_piezo_speaker import BrickletPiezoSpeaker";Blockly.Python.definitions_.bricklet_piezo_speaker_calibrate="def _bricklet_piezo_speaker_calibrate(host, port_ip, uid):\n  return _get_device(BrickletPiezoSpeaker, uid, _get_ipcon(host, port)).calibrate()";return["_bricklet_piezo_speaker_calibrate("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_piezo_speaker_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_piezo_speaker="from tinkerforge.bricklet_piezo_speaker import BrickletPiezoSpeaker";Blockly.Python.definitions_.bricklet_piezo_speaker_get_identity="def _bricklet_piezo_speaker_get_identity(host, port_ip, uid):\n  return _get_device(BrickletPiezoSpeaker, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_piezo_speaker_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ptc_get_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ptc="from tinkerforge.bricklet_ptc import BrickletPTC";Blockly.Python.definitions_.bricklet_ptc_get_temperature="def _bricklet_ptc_get_temperature(host, port_ip, uid):\n  return _get_device(BrickletPTC, uid, _get_ipcon(host, port)).get_temperature()";return["_bricklet_ptc_get_temperature("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ptc_get_resistance=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ptc="from tinkerforge.bricklet_ptc import BrickletPTC";Blockly.Python.definitions_.bricklet_ptc_get_resistance="def _bricklet_ptc_get_resistance(host, port_ip, uid):\n  return _get_device(BrickletPTC, uid, _get_ipcon(host, port)).get_resistance()";return["_bricklet_ptc_get_resistance("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ptc_set_noise_rejection_filter=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("FILTER");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ptc="from tinkerforge.bricklet_ptc import BrickletPTC";Blockly.Python.definitions_.bricklet_ptc_set_noise_rejection_filter="def _bricklet_ptc_set_noise_rejection_filter(host, port_ip, uid, filter):\n  _get_device(BrickletPTC, uid, _get_ipcon(host, port)).set_noise_rejection_filter(filter)";return"_bricklet_ptc_set_noise_rejection_filter("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_ptc_get_noise_rejection_filter=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ptc="from tinkerforge.bricklet_ptc import BrickletPTC";Blockly.Python.definitions_.bricklet_ptc_get_noise_rejection_filter="def _bricklet_ptc_get_noise_rejection_filter(host, port_ip, uid):\n  return _get_device(BrickletPTC, uid, _get_ipcon(host, port)).get_noise_rejection_filter()";return["_bricklet_ptc_get_noise_rejection_filter("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ptc_is_sensor_connected=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ptc="from tinkerforge.bricklet_ptc import BrickletPTC";Blockly.Python.definitions_.bricklet_ptc_is_sensor_connected="def _bricklet_ptc_is_sensor_connected(host, port_ip, uid):\n  return _get_device(BrickletPTC, uid, _get_ipcon(host, port)).is_sensor_connected()";return["_bricklet_ptc_is_sensor_connected("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ptc_set_wire_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("MODE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ptc="from tinkerforge.bricklet_ptc import BrickletPTC";Blockly.Python.definitions_.bricklet_ptc_set_wire_mode="def _bricklet_ptc_set_wire_mode(host, port_ip, uid, mode):\n  _get_device(BrickletPTC, uid, _get_ipcon(host, port)).set_wire_mode(mode)";return"_bricklet_ptc_set_wire_mode("+String(c)+", "+String(d)+", "+String(b)+", "+
String(a)+")\n"};
Blockly.Python.bricklet_ptc_get_wire_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ptc=
"from tinkerforge.bricklet_ptc import BrickletPTC";Blockly.Python.definitions_.bricklet_ptc_get_wire_mode="def _bricklet_ptc_get_wire_mode(host, port_ip, uid):\n  return _get_device(BrickletPTC, uid, _get_ipcon(host, port)).get_wire_mode()";return["_bricklet_ptc_get_wire_mode("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_ptc_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_ptc="from tinkerforge.bricklet_ptc import BrickletPTC";Blockly.Python.definitions_.bricklet_ptc_get_identity="def _bricklet_ptc_get_identity(host, port_ip, uid):\n  return _get_device(BrickletPTC, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_ptc_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_real_time_clock_set_date_time=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"YEAR",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"MONTH",Blockly.JavaScript.ORDER_ATOMIC),g=Blockly.JavaScript.valueToCode(a,
"DAY",Blockly.JavaScript.ORDER_ATOMIC),h=Blockly.JavaScript.valueToCode(a,"HOUR",Blockly.JavaScript.ORDER_ATOMIC),k=Blockly.JavaScript.valueToCode(a,"MINUTE",Blockly.JavaScript.ORDER_ATOMIC),l=Blockly.JavaScript.valueToCode(a,"SECOND",Blockly.JavaScript.ORDER_ATOMIC),m=Blockly.JavaScript.valueToCode(a,"CENTISECOND",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("WEEKDAY");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_real_time_clock="from tinkerforge.bricklet_real_time_clock import BrickletRealTimeClock";Blockly.Python.definitions_.bricklet_real_time_clock_set_date_time="def _bricklet_real_time_clock_set_date_time(host, port_ip, uid, year, month, day, hour, minute, second, centisecond, weekday):\n  _get_device(BrickletRealTimeClock, uid, _get_ipcon(host, port)).set_date_time(year, month, day, hour, minute, second, centisecond, weekday)";
return"_bricklet_real_time_clock_set_date_time("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(h)+", "+String(k)+", "+String(l)+", "+String(m)+", "+String(a)+")\n"};
Blockly.Python.bricklet_real_time_clock_get_date_time=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_real_time_clock="from tinkerforge.bricklet_real_time_clock import BrickletRealTimeClock";Blockly.Python.definitions_.bricklet_real_time_clock_get_date_time="def _bricklet_real_time_clock_get_date_time(host, port_ip, uid):\n  return _get_device(BrickletRealTimeClock, uid, _get_ipcon(host, port)).get_date_time()";return["_bricklet_real_time_clock_get_date_time("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_real_time_clock_get_timestamp=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_real_time_clock="from tinkerforge.bricklet_real_time_clock import BrickletRealTimeClock";Blockly.Python.definitions_.bricklet_real_time_clock_get_timestamp="def _bricklet_real_time_clock_get_timestamp(host, port_ip, uid):\n  return _get_device(BrickletRealTimeClock, uid, _get_ipcon(host, port)).get_timestamp()";return["_bricklet_real_time_clock_get_timestamp("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_real_time_clock_set_offset=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"OFFSET",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_real_time_clock="from tinkerforge.bricklet_real_time_clock import BrickletRealTimeClock";Blockly.Python.definitions_.bricklet_real_time_clock_set_offset="def _bricklet_real_time_clock_set_offset(host, port_ip, uid, offset):\n  _get_device(BrickletRealTimeClock, uid, _get_ipcon(host, port)).set_offset(offset)";return"_bricklet_real_time_clock_set_offset("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_real_time_clock_get_offset=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_real_time_clock="from tinkerforge.bricklet_real_time_clock import BrickletRealTimeClock";Blockly.Python.definitions_.bricklet_real_time_clock_get_offset="def _bricklet_real_time_clock_get_offset(host, port_ip, uid):\n  return _get_device(BrickletRealTimeClock, uid, _get_ipcon(host, port)).get_offset()";return["_bricklet_real_time_clock_get_offset("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_real_time_clock_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_real_time_clock="from tinkerforge.bricklet_real_time_clock import BrickletRealTimeClock";Blockly.Python.definitions_.bricklet_real_time_clock_get_identity="def _bricklet_real_time_clock_get_identity(host, port_ip, uid):\n  return _get_device(BrickletRealTimeClock, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_real_time_clock_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_remote_switch_switch_socket=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"HOUSE_CODE",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"RECEIVER_CODE",Blockly.JavaScript.ORDER_ATOMIC);a=
a.getFieldValue("SWITCH_TO");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";
Blockly.Python.definitions_.bricklet_remote_switch_switch_socket="def _bricklet_remote_switch_switch_socket(host, port_ip, uid, house_code, receiver_code, switch_to):\n  _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).switch_socket(house_code, receiver_code, switch_to)";return"_bricklet_remote_switch_switch_socket("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_remote_switch_get_switching_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";Blockly.Python.definitions_.bricklet_remote_switch_get_switching_state="def _bricklet_remote_switch_get_switching_state(host, port_ip, uid):\n  return _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).get_switching_state()";return["_bricklet_remote_switch_get_switching_state("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_remote_switch_set_repeats=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"REPEATS",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";Blockly.Python.definitions_.bricklet_remote_switch_set_repeats="def _bricklet_remote_switch_set_repeats(host, port_ip, uid, repeats):\n  _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).set_repeats(repeats)";return"_bricklet_remote_switch_set_repeats("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_remote_switch_get_repeats=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";Blockly.Python.definitions_.bricklet_remote_switch_get_repeats="def _bricklet_remote_switch_get_repeats(host, port_ip, uid):\n  return _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).get_repeats()";return["_bricklet_remote_switch_get_repeats("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_remote_switch_switch_socket_a=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"HOUSE_CODE",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"RECEIVER_CODE",Blockly.JavaScript.ORDER_ATOMIC);
a=a.getFieldValue("SWITCH_TO");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";
Blockly.Python.definitions_.bricklet_remote_switch_switch_socket_a="def _bricklet_remote_switch_switch_socket_a(host, port_ip, uid, house_code, receiver_code, switch_to):\n  _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).switch_socket_a(house_code, receiver_code, switch_to)";return"_bricklet_remote_switch_switch_socket_a("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_remote_switch_switch_socket_b=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"ADDRESS",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"UNIT",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("SWITCH_TO");
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";Blockly.Python.definitions_.bricklet_remote_switch_switch_socket_b="def _bricklet_remote_switch_switch_socket_b(host, port_ip, uid, address, unit, switch_to):\n  _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).switch_socket_b(address, unit, switch_to)";
return"_bricklet_remote_switch_switch_socket_b("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_remote_switch_dim_socket_b=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"ADDRESS",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"UNIT",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,
"DIM_VALUE",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";
Blockly.Python.definitions_.bricklet_remote_switch_dim_socket_b="def _bricklet_remote_switch_dim_socket_b(host, port_ip, uid, address, unit, dim_value):\n  _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).dim_socket_b(address, unit, dim_value)";return"_bricklet_remote_switch_dim_socket_b("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_remote_switch_switch_socket_c=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"SYSTEM_CODE",Blockly.JavaScript.ORDER_ATOMIC)),f=Blockly.JavaScript.valueToCode(a,"DEVICE_CODE",Blockly.JavaScript.ORDER_ATOMIC);
a=a.getFieldValue("SWITCH_TO");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";
Blockly.Python.definitions_.bricklet_remote_switch_switch_socket_c="def _bricklet_remote_switch_switch_socket_c(host, port_ip, uid, system_code, device_code, switch_to):\n  _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).switch_socket_c(system_code, device_code, switch_to)";return"_bricklet_remote_switch_switch_socket_c("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_remote_switch_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_remote_switch="from tinkerforge.bricklet_remote_switch import BrickletRemoteSwitch";Blockly.Python.definitions_.bricklet_remote_switch_get_identity="def _bricklet_remote_switch_get_identity(host, port_ip, uid):\n  return _get_device(BrickletRemoteSwitch, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_remote_switch_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rotary_encoder_get_count=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("RESET");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rotary_encoder="from tinkerforge.bricklet_rotary_encoder import BrickletRotaryEncoder";Blockly.Python.definitions_.bricklet_rotary_encoder_get_count="def _bricklet_rotary_encoder_get_count(host, port_ip, uid, reset):\n  return _get_device(BrickletRotaryEncoder, uid, _get_ipcon(host, port)).get_count(reset)";return["_bricklet_rotary_encoder_get_count("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rotary_encoder_is_pressed=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rotary_encoder="from tinkerforge.bricklet_rotary_encoder import BrickletRotaryEncoder";Blockly.Python.definitions_.bricklet_rotary_encoder_is_pressed="def _bricklet_rotary_encoder_is_pressed(host, port_ip, uid):\n  return _get_device(BrickletRotaryEncoder, uid, _get_ipcon(host, port)).is_pressed()";return["_bricklet_rotary_encoder_is_pressed("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rotary_encoder_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rotary_encoder="from tinkerforge.bricklet_rotary_encoder import BrickletRotaryEncoder";Blockly.Python.definitions_.bricklet_rotary_encoder_get_identity="def _bricklet_rotary_encoder_get_identity(host, port_ip, uid):\n  return _get_device(BrickletRotaryEncoder, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_rotary_encoder_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rotary_poti_get_position=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rotary_poti="from tinkerforge.bricklet_rotary_poti import BrickletRotaryPoti";Blockly.Python.definitions_.bricklet_rotary_poti_get_position="def _bricklet_rotary_poti_get_position(host, port_ip, uid):\n  return _get_device(BrickletRotaryPoti, uid, _get_ipcon(host, port)).get_position()";return["_bricklet_rotary_poti_get_position("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rotary_poti_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rotary_poti="from tinkerforge.bricklet_rotary_poti import BrickletRotaryPoti";Blockly.Python.definitions_.bricklet_rotary_poti_get_analog_value="def _bricklet_rotary_poti_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletRotaryPoti, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_rotary_poti_get_analog_value("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rotary_poti_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rotary_poti="from tinkerforge.bricklet_rotary_poti import BrickletRotaryPoti";Blockly.Python.definitions_.bricklet_rotary_poti_get_identity="def _bricklet_rotary_poti_get_identity(host, port_ip, uid):\n  return _get_device(BrickletRotaryPoti, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_rotary_poti_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rs232_write=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=JSON.stringify(Blockly.JavaScript.valueToCode(a,"MESSAGE",Blockly.JavaScript.ORDER_ATOMIC));a=Blockly.JavaScript.valueToCode(a,"LENGTH",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import=
"_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rs232="from tinkerforge.bricklet_rs232 import BrickletRS232";Blockly.Python.definitions_.bricklet_rs232_write="def _bricklet_rs232_write(host, port_ip, uid, message, length):\n  return _get_device(BrickletRS232, uid, _get_ipcon(host, port)).write(message, length)";return["_bricklet_rs232_write("+String(c)+", "+String(d)+", "+
String(b)+", "+String(e)+", "+String(a)+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rs232_read=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rs232="from tinkerforge.bricklet_rs232 import BrickletRS232";Blockly.Python.definitions_.bricklet_rs232_read="def _bricklet_rs232_read(host, port_ip, uid):\n  return _get_device(BrickletRS232, uid, _get_ipcon(host, port)).read()";return["_bricklet_rs232_read("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rs232_set_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("BAUDRATE"),f=a.getFieldValue("PARITY"),g=a.getFieldValue("STOPBITS"),h=a.getFieldValue("WORDLENGTH"),k=a.getFieldValue("HARDWARE_FLOWCONTROL");a=a.getFieldValue("SOFTWARE_FLOWCONTROL");
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rs232="from tinkerforge.bricklet_rs232 import BrickletRS232";Blockly.Python.definitions_.bricklet_rs232_set_configuration="def _bricklet_rs232_set_configuration(host, port_ip, uid, baudrate, parity, stopbits, wordlength, hardware_flowcontrol, software_flowcontrol):\n  _get_device(BrickletRS232, uid, _get_ipcon(host, port)).set_configuration(baudrate, parity, stopbits, wordlength, hardware_flowcontrol, software_flowcontrol)";
return"_bricklet_rs232_set_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(g)+", "+String(h)+", "+String(k)+", "+String(a)+")\n"};
Blockly.Python.bricklet_rs232_get_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rs232="from tinkerforge.bricklet_rs232 import BrickletRS232";Blockly.Python.definitions_.bricklet_rs232_get_configuration="def _bricklet_rs232_get_configuration(host, port_ip, uid):\n  return _get_device(BrickletRS232, uid, _get_ipcon(host, port)).get_configuration()";return["_bricklet_rs232_get_configuration("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_rs232_set_break_condition=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"BREAK_TIME",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rs232="from tinkerforge.bricklet_rs232 import BrickletRS232";Blockly.Python.definitions_.bricklet_rs232_set_break_condition="def _bricklet_rs232_set_break_condition(host, port_ip, uid, break_time):\n  _get_device(BrickletRS232, uid, _get_ipcon(host, port)).set_break_condition(break_time)";return"_bricklet_rs232_set_break_condition("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_rs232_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_rs232="from tinkerforge.bricklet_rs232 import BrickletRS232";Blockly.Python.definitions_.bricklet_rs232_get_identity="def _bricklet_rs232_get_identity(host, port_ip, uid):\n  return _get_device(BrickletRS232, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_rs232_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_segment_display_4x7_set_segments=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"SEGMENTS",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"BRIGHTNESS",Blockly.JavaScript.ORDER_ATOMIC);a=
a.getFieldValue("COLON");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_segment_display_4x7=
"from tinkerforge.bricklet_segment_display_4x7 import BrickletSegmentDisplay4x7";Blockly.Python.definitions_.bricklet_segment_display_4x7_set_segments="def _bricklet_segment_display_4x7_set_segments(host, port_ip, uid, segments, brightness, colon):\n  _get_device(BrickletSegmentDisplay4x7, uid, _get_ipcon(host, port)).set_segments(segments, brightness, colon)";return"_bricklet_segment_display_4x7_set_segments("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_segment_display_4x7_get_segments=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_segment_display_4x7="from tinkerforge.bricklet_segment_display_4x7 import BrickletSegmentDisplay4x7";Blockly.Python.definitions_.bricklet_segment_display_4x7_get_segments="def _bricklet_segment_display_4x7_get_segments(host, port_ip, uid):\n  return _get_device(BrickletSegmentDisplay4x7, uid, _get_ipcon(host, port)).get_segments()";
return["_bricklet_segment_display_4x7_get_segments("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_segment_display_4x7_start_counter=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"VALUE_FROM",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"VALUE_TO",Blockly.JavaScript.ORDER_ATOMIC),
g=Blockly.JavaScript.valueToCode(a,"INCREMENT",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"LENGTH",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";
Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_segment_display_4x7=
"from tinkerforge.bricklet_segment_display_4x7 import BrickletSegmentDisplay4x7";Blockly.Python.definitions_.bricklet_segment_display_4x7_start_counter="def _bricklet_segment_display_4x7_start_counter(host, port_ip, uid, value_from, value_to, increment, length):\n  _get_device(BrickletSegmentDisplay4x7, uid, _get_ipcon(host, port)).start_counter(value_from, value_to, increment, length)";return"_bricklet_segment_display_4x7_start_counter("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+
String(f)+", "+String(g)+", "+String(a)+")\n"};
Blockly.Python.bricklet_segment_display_4x7_get_counter_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_segment_display_4x7="from tinkerforge.bricklet_segment_display_4x7 import BrickletSegmentDisplay4x7";Blockly.Python.definitions_.bricklet_segment_display_4x7_get_counter_value="def _bricklet_segment_display_4x7_get_counter_value(host, port_ip, uid):\n  return _get_device(BrickletSegmentDisplay4x7, uid, _get_ipcon(host, port)).get_counter_value()";
return["_bricklet_segment_display_4x7_get_counter_value("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_segment_display_4x7_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_segment_display_4x7="from tinkerforge.bricklet_segment_display_4x7 import BrickletSegmentDisplay4x7";Blockly.Python.definitions_.bricklet_segment_display_4x7_get_identity="def _bricklet_segment_display_4x7_get_identity(host, port_ip, uid):\n  return _get_device(BrickletSegmentDisplay4x7, uid, _get_ipcon(host, port)).get_identity()";
return["_bricklet_segment_display_4x7_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_solid_state_relay_set_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("STATE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_solid_state_relay="from tinkerforge.bricklet_solid_state_relay import BrickletSolidStateRelay";Blockly.Python.definitions_.bricklet_solid_state_relay_set_state="def _bricklet_solid_state_relay_set_state(host, port_ip, uid, state):\n  _get_device(BrickletSolidStateRelay, uid, _get_ipcon(host, port)).set_state(state)";return"_bricklet_solid_state_relay_set_state("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_solid_state_relay_get_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_solid_state_relay="from tinkerforge.bricklet_solid_state_relay import BrickletSolidStateRelay";Blockly.Python.definitions_.bricklet_solid_state_relay_get_state="def _bricklet_solid_state_relay_get_state(host, port_ip, uid):\n  return _get_device(BrickletSolidStateRelay, uid, _get_ipcon(host, port)).get_state()";return["_bricklet_solid_state_relay_get_state("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_solid_state_relay_set_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"TIME",Blockly.JavaScript.ORDER_ATOMIC);a=a.getFieldValue("STATE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_solid_state_relay="from tinkerforge.bricklet_solid_state_relay import BrickletSolidStateRelay";Blockly.Python.definitions_.bricklet_solid_state_relay_set_monoflop="def _bricklet_solid_state_relay_set_monoflop(host, port_ip, uid, state, time):\n  _get_device(BrickletSolidStateRelay, uid, _get_ipcon(host, port)).set_monoflop(state, time)";
return"_bricklet_solid_state_relay_set_monoflop("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+", "+String(e)+")\n"};
Blockly.Python.bricklet_solid_state_relay_get_monoflop=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_solid_state_relay="from tinkerforge.bricklet_solid_state_relay import BrickletSolidStateRelay";Blockly.Python.definitions_.bricklet_solid_state_relay_get_monoflop="def _bricklet_solid_state_relay_get_monoflop(host, port_ip, uid):\n  return _get_device(BrickletSolidStateRelay, uid, _get_ipcon(host, port)).get_monoflop()";return["_bricklet_solid_state_relay_get_monoflop("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_solid_state_relay_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_solid_state_relay="from tinkerforge.bricklet_solid_state_relay import BrickletSolidStateRelay";Blockly.Python.definitions_.bricklet_solid_state_relay_get_identity="def _bricklet_solid_state_relay_get_identity(host, port_ip, uid):\n  return _get_device(BrickletSolidStateRelay, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_solid_state_relay_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_sound_intensity_get_intensity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_sound_intensity="from tinkerforge.bricklet_sound_intensity import BrickletSoundIntensity";Blockly.Python.definitions_.bricklet_sound_intensity_get_intensity="def _bricklet_sound_intensity_get_intensity(host, port_ip, uid):\n  return _get_device(BrickletSoundIntensity, uid, _get_ipcon(host, port)).get_intensity()";return["_bricklet_sound_intensity_get_intensity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_sound_intensity_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_sound_intensity="from tinkerforge.bricklet_sound_intensity import BrickletSoundIntensity";Blockly.Python.definitions_.bricklet_sound_intensity_get_identity="def _bricklet_sound_intensity_get_identity(host, port_ip, uid):\n  return _get_device(BrickletSoundIntensity, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_sound_intensity_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_temperature_get_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature="from tinkerforge.bricklet_temperature import BrickletTemperature";Blockly.Python.definitions_.bricklet_temperature_get_temperature="def _bricklet_temperature_get_temperature(host, port_ip, uid):\n  return _get_device(BrickletTemperature, uid, _get_ipcon(host, port)).get_temperature()";return["_bricklet_temperature_get_temperature("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_temperature_set_i2c_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=a.getFieldValue("MODE");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature="from tinkerforge.bricklet_temperature import BrickletTemperature";Blockly.Python.definitions_.bricklet_temperature_set_i2c_mode="def _bricklet_temperature_set_i2c_mode(host, port_ip, uid, mode):\n  _get_device(BrickletTemperature, uid, _get_ipcon(host, port)).set_i2c_mode(mode)";return"_bricklet_temperature_set_i2c_mode("+
String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_temperature_get_i2c_mode=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature="from tinkerforge.bricklet_temperature import BrickletTemperature";Blockly.Python.definitions_.bricklet_temperature_get_i2c_mode="def _bricklet_temperature_get_i2c_mode(host, port_ip, uid):\n  return _get_device(BrickletTemperature, uid, _get_ipcon(host, port)).get_i2c_mode()";return["_bricklet_temperature_get_i2c_mode("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_temperature_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature="from tinkerforge.bricklet_temperature import BrickletTemperature";Blockly.Python.definitions_.bricklet_temperature_get_identity="def _bricklet_temperature_get_identity(host, port_ip, uid):\n  return _get_device(BrickletTemperature, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_temperature_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_temperature_ir_get_ambient_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature_ir="from tinkerforge.bricklet_temperature_ir import BrickletTemperatureIR";Blockly.Python.definitions_.bricklet_temperature_ir_get_ambient_temperature="def _bricklet_temperature_ir_get_ambient_temperature(host, port_ip, uid):\n  return _get_device(BrickletTemperatureIR, uid, _get_ipcon(host, port)).get_ambient_temperature()";
return["_bricklet_temperature_ir_get_ambient_temperature("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_temperature_ir_get_object_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature_ir="from tinkerforge.bricklet_temperature_ir import BrickletTemperatureIR";Blockly.Python.definitions_.bricklet_temperature_ir_get_object_temperature="def _bricklet_temperature_ir_get_object_temperature(host, port_ip, uid):\n  return _get_device(BrickletTemperatureIR, uid, _get_ipcon(host, port)).get_object_temperature()";
return["_bricklet_temperature_ir_get_object_temperature("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_temperature_ir_set_emissivity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);a=Blockly.JavaScript.valueToCode(a,"EMISSIVITY",Blockly.JavaScript.ORDER_ATOMIC);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature_ir="from tinkerforge.bricklet_temperature_ir import BrickletTemperatureIR";Blockly.Python.definitions_.bricklet_temperature_ir_set_emissivity="def _bricklet_temperature_ir_set_emissivity(host, port_ip, uid, emissivity):\n  _get_device(BrickletTemperatureIR, uid, _get_ipcon(host, port)).set_emissivity(emissivity)";
return"_bricklet_temperature_ir_set_emissivity("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+")\n"};
Blockly.Python.bricklet_temperature_ir_get_emissivity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature_ir="from tinkerforge.bricklet_temperature_ir import BrickletTemperatureIR";Blockly.Python.definitions_.bricklet_temperature_ir_get_emissivity="def _bricklet_temperature_ir_get_emissivity(host, port_ip, uid):\n  return _get_device(BrickletTemperatureIR, uid, _get_ipcon(host, port)).get_emissivity()";return["_bricklet_temperature_ir_get_emissivity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_temperature_ir_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_temperature_ir="from tinkerforge.bricklet_temperature_ir import BrickletTemperatureIR";Blockly.Python.definitions_.bricklet_temperature_ir_get_identity="def _bricklet_temperature_ir_get_identity(host, port_ip, uid):\n  return _get_device(BrickletTemperatureIR, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_temperature_ir_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_thermocouple_get_temperature=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_thermocouple="from tinkerforge.bricklet_thermocouple import BrickletThermocouple";Blockly.Python.definitions_.bricklet_thermocouple_get_temperature="def _bricklet_thermocouple_get_temperature(host, port_ip, uid):\n  return _get_device(BrickletThermocouple, uid, _get_ipcon(host, port)).get_temperature()";return["_bricklet_thermocouple_get_temperature("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_thermocouple_set_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=a.getFieldValue("AVERAGING"),f=a.getFieldValue("THERMOCOUPLE_TYPE");a=a.getFieldValue("FILTER");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";
Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_thermocouple="from tinkerforge.bricklet_thermocouple import BrickletThermocouple";Blockly.Python.definitions_.bricklet_thermocouple_set_configuration="def _bricklet_thermocouple_set_configuration(host, port_ip, uid, averaging, thermocouple_type, filter):\n  _get_device(BrickletThermocouple, uid, _get_ipcon(host, port)).set_configuration(averaging, thermocouple_type, filter)";
return"_bricklet_thermocouple_set_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(f)+", "+String(a)+")\n"};
Blockly.Python.bricklet_thermocouple_get_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_thermocouple="from tinkerforge.bricklet_thermocouple import BrickletThermocouple";Blockly.Python.definitions_.bricklet_thermocouple_get_configuration="def _bricklet_thermocouple_get_configuration(host, port_ip, uid):\n  return _get_device(BrickletThermocouple, uid, _get_ipcon(host, port)).get_configuration()";return["_bricklet_thermocouple_get_configuration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_thermocouple_get_error_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_thermocouple="from tinkerforge.bricklet_thermocouple import BrickletThermocouple";Blockly.Python.definitions_.bricklet_thermocouple_get_error_state="def _bricklet_thermocouple_get_error_state(host, port_ip, uid):\n  return _get_device(BrickletThermocouple, uid, _get_ipcon(host, port)).get_error_state()";return["_bricklet_thermocouple_get_error_state("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_thermocouple_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_thermocouple="from tinkerforge.bricklet_thermocouple import BrickletThermocouple";Blockly.Python.definitions_.bricklet_thermocouple_get_identity="def _bricklet_thermocouple_get_identity(host, port_ip, uid):\n  return _get_device(BrickletThermocouple, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_thermocouple_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_tilt_get_tilt_state=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_tilt="from tinkerforge.bricklet_tilt import BrickletTilt";Blockly.Python.definitions_.bricklet_tilt_get_tilt_state="def _bricklet_tilt_get_tilt_state(host, port_ip, uid):\n  return _get_device(BrickletTilt, uid, _get_ipcon(host, port)).get_tilt_state()";return["_bricklet_tilt_get_tilt_state("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_tilt_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_tilt="from tinkerforge.bricklet_tilt import BrickletTilt";Blockly.Python.definitions_.bricklet_tilt_get_identity="def _bricklet_tilt_get_identity(host, port_ip, uid):\n  return _get_device(BrickletTilt, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_tilt_get_identity("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_uv_light_get_uv_light=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_uv_light="from tinkerforge.bricklet_uv_light import BrickletUVLight";Blockly.Python.definitions_.bricklet_uv_light_get_uv_light="def _bricklet_uv_light_get_uv_light(host, port_ip, uid):\n  return _get_device(BrickletUVLight, uid, _get_ipcon(host, port)).get_uv_light()";return["_bricklet_uv_light_get_uv_light("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_uv_light_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_uv_light="from tinkerforge.bricklet_uv_light import BrickletUVLight";Blockly.Python.definitions_.bricklet_uv_light_get_identity="def _bricklet_uv_light_get_identity(host, port_ip, uid):\n  return _get_device(BrickletUVLight, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_uv_light_get_identity("+c+", "+a+", "+
b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_get_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage="from tinkerforge.bricklet_voltage import BrickletVoltage";Blockly.Python.definitions_.bricklet_voltage_get_voltage="def _bricklet_voltage_get_voltage(host, port_ip, uid):\n  return _get_device(BrickletVoltage, uid, _get_ipcon(host, port)).get_voltage()";return["_bricklet_voltage_get_voltage("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_get_analog_value=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage="from tinkerforge.bricklet_voltage import BrickletVoltage";Blockly.Python.definitions_.bricklet_voltage_get_analog_value="def _bricklet_voltage_get_analog_value(host, port_ip, uid):\n  return _get_device(BrickletVoltage, uid, _get_ipcon(host, port)).get_analog_value()";return["_bricklet_voltage_get_analog_value("+c+", "+
a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage="from tinkerforge.bricklet_voltage import BrickletVoltage";Blockly.Python.definitions_.bricklet_voltage_get_identity="def _bricklet_voltage_get_identity(host, port_ip, uid):\n  return _get_device(BrickletVoltage, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_voltage_get_identity("+c+", "+a+", "+b+")",
Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_current_get_current=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage_current="from tinkerforge.bricklet_voltage_current import BrickletVoltageCurrent";Blockly.Python.definitions_.bricklet_voltage_current_get_current="def _bricklet_voltage_current_get_current(host, port_ip, uid):\n  return _get_device(BrickletVoltageCurrent, uid, _get_ipcon(host, port)).get_current()";return["_bricklet_voltage_current_get_current("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_current_get_voltage=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage_current="from tinkerforge.bricklet_voltage_current import BrickletVoltageCurrent";Blockly.Python.definitions_.bricklet_voltage_current_get_voltage="def _bricklet_voltage_current_get_voltage(host, port_ip, uid):\n  return _get_device(BrickletVoltageCurrent, uid, _get_ipcon(host, port)).get_voltage()";return["_bricklet_voltage_current_get_voltage("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_current_get_power=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage_current="from tinkerforge.bricklet_voltage_current import BrickletVoltageCurrent";Blockly.Python.definitions_.bricklet_voltage_current_get_power="def _bricklet_voltage_current_get_power(host, port_ip, uid):\n  return _get_device(BrickletVoltageCurrent, uid, _get_ipcon(host, port)).get_power()";return["_bricklet_voltage_current_get_power("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_current_set_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"VOLTAGE_CONVERSION_TIME",Blockly.JavaScript.ORDER_ATOMIC),f=Blockly.JavaScript.valueToCode(a,"CURRENT_CONVERSION_TIME",Blockly.JavaScript.ORDER_ATOMIC);
a=a.getFieldValue("AVERAGING");Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device=
"def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage_current="from tinkerforge.bricklet_voltage_current import BrickletVoltageCurrent";
Blockly.Python.definitions_.bricklet_voltage_current_set_configuration="def _bricklet_voltage_current_set_configuration(host, port_ip, uid, averaging, voltage_conversion_time, current_conversion_time):\n  _get_device(BrickletVoltageCurrent, uid, _get_ipcon(host, port)).set_configuration(averaging, voltage_conversion_time, current_conversion_time)";return"_bricklet_voltage_current_set_configuration("+String(c)+", "+String(d)+", "+String(b)+", "+String(a)+", "+String(e)+", "+String(f)+")\n"};
Blockly.Python.bricklet_voltage_current_get_configuration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage_current="from tinkerforge.bricklet_voltage_current import BrickletVoltageCurrent";Blockly.Python.definitions_.bricklet_voltage_current_get_configuration="def _bricklet_voltage_current_get_configuration(host, port_ip, uid):\n  return _get_device(BrickletVoltageCurrent, uid, _get_ipcon(host, port)).get_configuration()";
return["_bricklet_voltage_current_get_configuration("+c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_current_set_calibration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC),d=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===d&&(d=4223);var e=Blockly.JavaScript.valueToCode(a,"GAIN_MULTIPLIER",Blockly.JavaScript.ORDER_ATOMIC);a=Blockly.JavaScript.valueToCode(a,"GAIN_DIVISOR",Blockly.JavaScript.ORDER_ATOMIC);
Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon="def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage_current="from tinkerforge.bricklet_voltage_current import BrickletVoltageCurrent";Blockly.Python.definitions_.bricklet_voltage_current_set_calibration="def _bricklet_voltage_current_set_calibration(host, port_ip, uid, gain_multiplier, gain_divisor):\n  _get_device(BrickletVoltageCurrent, uid, _get_ipcon(host, port)).set_calibration(gain_multiplier, gain_divisor)";
return"_bricklet_voltage_current_set_calibration("+String(c)+", "+String(d)+", "+String(b)+", "+String(e)+", "+String(a)+")\n"};
Blockly.Python.bricklet_voltage_current_get_calibration=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage_current="from tinkerforge.bricklet_voltage_current import BrickletVoltageCurrent";Blockly.Python.definitions_.bricklet_voltage_current_get_calibration="def _bricklet_voltage_current_get_calibration(host, port_ip, uid):\n  return _get_device(BrickletVoltageCurrent, uid, _get_ipcon(host, port)).get_calibration()";return["_bricklet_voltage_current_get_calibration("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.bricklet_voltage_current_get_identity=function(a){var b=Blockly.Python.valueToCode(a,"_UID",Blockly.Python.ORDER_ATOMIC),c=Blockly.Python.valueToCode(a,"_HOST",Blockly.Python.ORDER_ATOMIC);a=Blockly.Python.valueToCode(a,"_PORT",Blockly.Python.ORDER_ATOMIC);Blockly.Python.tfAppendCleanupCall_=!0;"4280"===a&&(a=4223);Blockly.Python.definitions_.common_python_import="_ipcon_cache = {}\n_device_cache = {}\n\nfrom tinkerforge.ip_connection import IPConnection";Blockly.Python.definitions_.common_python_get_ipcon=
"def _get_ipcon(host, port):\n  global _ipcon_cache\n  key = host + ':' + str(port)\n\n  if key not in _ipcon_cache:\n    ipcon = IPConnection()\n    ipcon.connect(host, port)\n    _ipcon_cache[key] = ipcon\n\n  return _ipcon_cache[key]";Blockly.Python.definitions_.common_python_get_device="def _get_device(device_class, uid, ipcon):\n  global _device_cache\n  key = str(device_class.DEVICE_IDENTIFIER) + ':' + uid\n\n  if key not in _device_cache:\n    device = device_class(uid, ipcon)\n    device.set_response_expected_all(True)\n    _device_cache[key] = device\n\n  return _device_cache[key]";
Blockly.Python.definitions_.common_python_cleanup="def _cleanup():\n  for ipcon in _ipcon_cache.values():\n    ipcon.disconnect()";Blockly.Python.definitions_.import_bricklet_voltage_current="from tinkerforge.bricklet_voltage_current import BrickletVoltageCurrent";Blockly.Python.definitions_.bricklet_voltage_current_get_identity="def _bricklet_voltage_current_get_identity(host, port_ip, uid):\n  return _get_device(BrickletVoltageCurrent, uid, _get_ipcon(host, port)).get_identity()";return["_bricklet_voltage_current_get_identity("+
c+", "+a+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.colour={};Blockly.Python.colour_picker=function(a){return["'"+a.getFieldValue("COLOUR")+"'",Blockly.Python.ORDER_ATOMIC]};Blockly.Python.colour_random=function(a){Blockly.Python.definitions_.import_random="import random";return["'#%06x' % random.randint(0, 2**24 - 1)",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.colour_rgb=function(a){var b=Blockly.Python.provideFunction_("colour_rgb",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(r, g, b):","  r = round(min(100, max(0, r)) * 2.55)","  g = round(min(100, max(0, g)) * 2.55)","  b = round(min(100, max(0, b)) * 2.55)","  return '#%02x%02x%02x' % (r, g, b)"]),c=Blockly.Python.valueToCode(a,"RED",Blockly.Python.ORDER_NONE)||0,d=Blockly.Python.valueToCode(a,"GREEN",Blockly.Python.ORDER_NONE)||0;a=Blockly.Python.valueToCode(a,"BLUE",Blockly.Python.ORDER_NONE)||
0;return[b+"("+c+", "+d+", "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.colour_blend=function(a){var b=Blockly.Python.provideFunction_("colour_blend",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(colour1, colour2, ratio):","  r1, r2 = int(colour1[1:3], 16), int(colour2[1:3], 16)","  g1, g2 = int(colour1[3:5], 16), int(colour2[3:5], 16)","  b1, b2 = int(colour1[5:7], 16), int(colour2[5:7], 16)","  ratio = min(1, max(0, ratio))","  r = round(r1 * (1 - ratio) + r2 * ratio)","  g = round(g1 * (1 - ratio) + g2 * ratio)","  b = round(b1 * (1 - ratio) + b2 * ratio)",
"  return '#%02x%02x%02x' % (r, g, b)"]),c=Blockly.Python.valueToCode(a,"COLOUR1",Blockly.Python.ORDER_NONE)||"'#000000'",d=Blockly.Python.valueToCode(a,"COLOUR2",Blockly.Python.ORDER_NONE)||"'#000000'";a=Blockly.Python.valueToCode(a,"RATIO",Blockly.Python.ORDER_NONE)||0;return[b+"("+c+", "+d+", "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.lists={};Blockly.Python.lists_create_empty=function(a){return["[]",Blockly.Python.ORDER_ATOMIC]};Blockly.Python.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c<a.itemCount_;c++)b[c]=Blockly.Python.valueToCode(a,"ADD"+c,Blockly.Python.ORDER_NONE)||"None";b="["+b.join(", ")+"]";return[b,Blockly.Python.ORDER_ATOMIC]};
Blockly.Python.lists_repeat=function(a){var b=Blockly.Python.valueToCode(a,"ITEM",Blockly.Python.ORDER_NONE)||"None";a=Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_MULTIPLICATIVE)||"0";return["["+b+"] * "+a,Blockly.Python.ORDER_MULTIPLICATIVE]};Blockly.Python.lists_length=function(a){return["len("+(Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"[]")+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.lists_isEmpty=function(a){return["not len("+(Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"[]")+")",Blockly.Python.ORDER_LOGICAL_NOT]};
Blockly.Python.lists_indexOf=function(a){var b=Blockly.Python.valueToCode(a,"FIND",Blockly.Python.ORDER_NONE)||"[]",c=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_MEMBER)||"''";return[("FIRST"==a.getFieldValue("END")?Blockly.Python.provideFunction_("first_index",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(myList, elem):","  try: theIndex = myList.index(elem) + 1","  except: theIndex = 0","  return theIndex"]):Blockly.Python.provideFunction_("last_index",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+
"(myList, elem):","  try: theIndex = len(myList) - myList[::-1].index(elem)","  except: theIndex = 0","  return theIndex"]))+"("+c+", "+b+")",Blockly.Python.ORDER_FUNCTION_CALL]};
Blockly.Python.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.Python.valueToCode(a,"AT",Blockly.Python.ORDER_UNARY_SIGN)||"1";a=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_MEMBER)||"[]";if("FIRST"==c){if("GET"==b)return[a+"[0]",Blockly.Python.ORDER_MEMBER];c=a+".pop(0)";if("GET_REMOVE"==b)return[c,Blockly.Python.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("LAST"==c){if("GET"==b)return[a+"[-1]",Blockly.Python.ORDER_MEMBER];
c=a+".pop()";if("GET_REMOVE"==b)return[c,Blockly.Python.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("FROM_START"==c){d=Blockly.isNumber(d)?parseInt(d,10)-1:"int("+d+" - 1)";if("GET"==b)return[a+"["+d+"]",Blockly.Python.ORDER_MEMBER];c=a+".pop("+d+")";if("GET_REMOVE"==b)return[c,Blockly.Python.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("FROM_END"==c){if("GET"==b)return[a+"[-"+d+"]",Blockly.Python.ORDER_MEMBER];c=a+".pop(-"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Python.ORDER_FUNCTION_CALL];
if("REMOVE"==b)return c+"\n"}else if("RANDOM"==c){Blockly.Python.definitions_.import_random="import random";if("GET"==b)return["random.choice("+a+")",Blockly.Python.ORDER_FUNCTION_CALL];c=Blockly.Python.provideFunction_("lists_remove_random_item",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(myList):","  x = int(random.random() * len(myList))","  return myList.pop(x)"])+"("+a+")";if("GET_REMOVE"==b)return[c,Blockly.Python.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}throw"Unhandled combination (lists_getIndex).";
};
Blockly.Python.lists_setIndex=function(a){var b=Blockly.Python.valueToCode(a,"LIST",Blockly.Python.ORDER_MEMBER)||"[]",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Python.valueToCode(a,"AT",Blockly.Python.ORDER_NONE)||"1";a=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"None";if("FIRST"==d){if("SET"==c)return b+"[0] = "+a+"\n";if("INSERT"==c)return b+".insert(0, "+a+")\n"}else if("LAST"==d){if("SET"==c)return b+"[-1] = "+a+"\n";if("INSERT"==c)return b+
".append("+a+")\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)";if("SET"==c)return b+"["+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert("+e+", "+a+")\n"}else if("FROM_END"==d){if("SET"==c)return b+"[-"+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert(-"+e+", "+a+")\n"}else if("RANDOM"==d){Blockly.Python.definitions_.import_random="import random";b.match(/^\w+$/)?d="":(d=Blockly.Python.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),e=d+" = "+
b+"\n",b=d,d=e);e=Blockly.Python.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);d+=e+" = int(random.random() * len("+b+"))\n";if("SET"==c)return d+(b+"["+e+"] = "+a+"\n");if("INSERT"==c)return d+(b+".insert("+e+", "+a+")\n")}throw"Unhandled combination (lists_setIndex).";};
Blockly.Python.lists_getSublist=function(a){var b=Blockly.Python.valueToCode(a,"LIST",Blockly.Python.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Python.valueToCode(a,"AT1",Blockly.Python.ORDER_ADDITIVE)||"1";a=Blockly.Python.valueToCode(a,"AT2",Blockly.Python.ORDER_ADDITIVE)||"1";"FIRST"==c||"FROM_START"==c&&"1"==e?e="":"FROM_START"==c?e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)":"FROM_END"==c&&(e=Blockly.isNumber(e)?-parseInt(e,10):"-int("+e+")");
"LAST"==d||"FROM_END"==d&&"1"==a?a="":"FROM_START"==c?a=Blockly.isNumber(a)?parseInt(a,10):"int("+a+")":"FROM_END"==c&&(Blockly.isNumber(a)?(a=1-parseInt(a,10),0==a&&(a="")):(Blockly.Python.definitions_.import_sys="import sys",a="int(1 - "+a+") or sys.maxsize"));return[b+"["+e+" : "+a+"]",Blockly.Python.ORDER_MEMBER]};
Blockly.Python.lists_split=function(a){var b=a.getFieldValue("MODE");if("SPLIT"==b)b=Blockly.Python.valueToCode(a,"INPUT",Blockly.Python.ORDER_MEMBER)||"''",a=Blockly.Python.valueToCode(a,"DELIM",Blockly.Python.ORDER_NONE),a=b+".split("+a+")";else if("JOIN"==b)b=Blockly.Python.valueToCode(a,"INPUT",Blockly.Python.ORDER_NONE)||"[]",a=Blockly.Python.valueToCode(a,"DELIM",Blockly.Python.ORDER_MEMBER)||"''",a=a+".join("+b+")";else throw"Unknown mode: "+b;return[a,Blockly.Python.ORDER_FUNCTION_CALL]};