User Tools

Site Tools

한국어

logicpython:cubloc_api:hread

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

logicpython:cubloc_api:hread [2026/04/10 02:06] – created - external edit 127.0.0.1logicpython:cubloc_api:hread [2026/04/10 02:37] (current) – removed mfranklin
Line 1: Line 1:
-====== HRead ====== 
- 
-Read data from the simulated SRAM heap. 
- 
-===== Syntax ===== 
- 
-<code python> 
-from cubloc import HRead 
- 
-HRead( address: int, byteLength: int, returnType: type[int] | type[float] | type[bytes] | type[bytearray] = int, ) 
-</code> 
- 
-===== Parameters ===== 
- 
-  * **address**: ''Heap address'' (0 to 56319). 
-  * **byteLength**: Number of bytes to read. Must be positive and remain within the heap bounds. 
-  * **returnType**: Use int, float, bytes, or bytearray to control how the heap bytes are decoded. The default is int. 
- 
-===== Return Value ===== 
- 
-Returns the heap data decoded according to ''returnType'' as int, float, bytes, or bytearray. 
- 
-===== Exceptions ===== 
- 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: ''address'', ''byteLength'', or ''returnType'' has an invalid type. 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''address'' or ''byteLength'' is out of range, the read would extend past the end of heap, or a float read was requested with a ''byteLength'' other than 4. 
- 
-===== Example ===== 
- 
-<code python> 
-from cubloc import HRead 
- 
-# Example usage 
-result = HRead(1, 1, int) 
-print(result) 
-</code> 
- 
-===== Related APIs ===== 
- 
-  * [[logicpython:cubloc_api:eeread|EERead]] 
-  * [[logicpython:cubloc_api:eewrite|EEWrite]] 
-  * [[logicpython:cubloc_api:heap|Heap]] 
-  * [[logicpython:cubloc_api:heapclear|HeapClear]] 
-  * [[logicpython:cubloc_api:heapw|HeapW]] 
  
logicpython/cubloc_api/hread.1775786798.txt.gz · Last modified: by 127.0.0.1