MCPcopy Create free account
hub / github.com/ARM-software/AVH / readFile

Function readFile

interface/sensor/python/vsi_sensor.py:274–284  ·  view source on GitHub ↗
(n_bytes)

Source from the content-addressed store, hash-verified

272# @param n_bytes number of bytes to read
273# @return data
274def readFile(n_bytes):
275 global file
276
277 try:
278 logger.info("Read recording file")
279 data = bytearray(file.read(n_bytes))
280 except Exception as e:
281 logger.debug(f"An error occurred when reading n_bytes = {n_bytes}: {e}")
282 data = bytearray()
283
284 return data
285
286
287## Close sensor recording file

Callers 1

__getRecordMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected