pylab_ml.common.file_io.readtxtMemFile

readtxtMemFile(fileName, memSize=None, bitsize_source=None, bitsize_target=None, numerative=None, raw_data=False)[source]

Read a file with memory data in simple hex or integer format.

Parameters:
  • fileName (string) – DESCRIPTION.

  • memSize (int) – size from the reserved memory array.

  • bitsize_source (int) – size from one datum, e.q. 8-bit, 16-bit, must be multiple times of 8 this has an effect on the adress counting if None each datum will assign to an adress, otherwise each 8-bit datum has an adress only little endian is supported yet

  • bitsize_target (int) –

    size from one datum in the array result.

    needed if negative values in the sourcefile

  • numerative ({adr : base) – dat : base} # base could be 10(decimal) or 16(hex)

  • raw_data (bool) – if True than return with a list of adr + data if False than return with a coherent memory, beginning with startadr

Returns:

  • startadress (integer)

  • data (memory data integer list, None entries for) – not used/initialized values