in indigo.js [1067:1075]
IndigoObject.prototype.charge = function() {
this.d._setSessionId();
let value = alloc('int');
let res = this.d._checkResult(this.d._lib.indigoGetCharge(this.id, value));
if (res === null)
return null;
else
return value.deref();
};