Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Node-Red: Bit Switch

var a= parseInt(msg.payload.value2);

var basis= flow.get('AggStatus')||'00000000000000000000000000000000';
var result;
var aktStatus;
var id=a; //Aggregat # (1basierend)
id=32-id;

  if(basis.charAt(id)==='1') {
     aktStatus='0';
  }else{
     aktStatus='1';  
}
result= basis.substring(0,id)+aktStatus+basis.substring(id+1);
flow.set('AggStatus',result);
msg.payload=result
Comment

PREVIOUS NEXT
Code Example
Javascript :: clone copy a table in servicenow 
Javascript :: ASPxGridView - How to trigger the CustomButtonCallback event 
Javascript :: errorhandler npm 
Javascript :: print each word in a string javascript 
Javascript :: trigger many url calls JS 
Javascript :: how to get node modules 
Javascript :: jquery replacechild 
Javascript :: "["value"]" to array js 
Javascript :: nested json example 
Javascript :: firebase recaptcha using react js 
Javascript :: how to add class to only one selected row then remove it after selecting it again 
Javascript :: hook redux state with redux extension 
Javascript :: array of function 
Javascript :: node_modulesexpresslib outerindex.js:508 this.stack.push(layer); 
Javascript :: React Hook "useState" is called in function "app" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter 
Javascript :: javascriot html eqaul to jquery 
Javascript :: how to add a key to every html tag in a list react 
Javascript :: typeorm caching queries time limit 
Javascript :: hex decode javascript 
Javascript :: angular crud rest api medium 
Javascript :: date change error 
Javascript :: Example to adds two colour palettes to the sidebar in wordpress 
Javascript :: angular material primary lighter 
Javascript :: Getting error after I put Async function in useEffect 
Javascript :: loader on map function in react js 
Javascript :: header fetch as string 
Javascript :: jshack1 
Javascript :: @click:append 
Javascript :: split a table by sertain number of entities javascript 
Javascript :: get call log in react native android 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =