Skip to main content

system.kanoa.tooling.recordToolReading(toolingAssetId, reading, tStamp)

Records a reading of a tool's own shot counter. The first reading sets lifetimeCycles to it; later readings add the increase to every cycle count. A reading below the last one (the counter was reset) only becomes the new baseline. While readings keep coming, recordCycles leaves the tool alone.


Parameters​

toolingAssetId Integer: The tool

reading Integer: The counter's value

tStamp Date: When it was read. None = now


Returns​

(cyclesAdded, message)


Example​

toolingAssetId = 1
reading = 1
tStamp = system.date.now()
cyclesAdded, message = system.kanoa.tooling.recordToolReading(toolingAssetId, reading, tStamp)