Classes | |
| class | DDR_ErrorCode |
| Represents the possible errors that can be returned from the memory block access functions. More... | |
| class | Handle |
| Represents an opaque token or handle to data. More... | |
| class | ValueHandle |
| Represents a value that can be passed into or out of a function. More... | |
Functions | |
| DDR_ErrorCode | ddr_openmemoryblock (blockName, Handle dataHandle) |
| Open access to a memory block for exclusive use, given the name of the memory block. | |
| DDR_ErrorCode | ddr_closememoryblock (Handle dataHandle) |
| Close access to a memory block previously opened by ddr_openmemoryblock(), thus releasing it for others to open. | |
| DDR_ErrorCode | ddr_getmemorysize (Handle dataHandle, ValueHandle memorySizeInChunks) |
| Retrieve the number of chunks in the memory block indicated by the handle to the successfully opened memory block. | |
| DDR_ErrorCode | ddr_getdatachunk (Handle dataHandle, int chunkOffset, ValueHandle value) |
| Read a single 32-bit value at the given offset in the memory block indicated by the specified handle. | |
| DDR_ErrorCode | ddr_setdatachunk (Handle dataHandle, int chunkOffset, int value) |
| Writes a single 32-bit value to the given offset in the memory block indicated by the specified handle. | |
Variables | |
| int | DDR_MAX_OFFSET = 32 |
| All offsets must from 0 to 1 less than this value. | |
| str | BLOCK_NAME_0 = "gorp" |
| Name of the first block. | |
| str | BLOCK_NAME_1 = "baba" |
| Name of the second block. | |
| str | BLOCK_NAME_2 = "yaga" |
| Name of the third block. | |
| os | dll_path = os.path.join(os.path.dirname(__file__), "Adapter_BackEnd") |
| Path to the Adapter_BackEnd DLL that will be loaded by ctypes. | |
| else : | |
| cdll | adapter_backend = cdll.LoadLibrary(dll_path) |
| Instance of a CDLL object representing the loaded Adapter_BackEnd DLL. | |
| DDR_ErrorCode ddr_closememoryblock | ( | Handle | dataHandle | ) |
Close access to a memory block previously opened by ddr_openmemoryblock(), thus releasing it for others to open.
| dataHandle | Handle to a previously opened memory block as obtained from the ddr_openmemoryblock() function. |
Definition at line 113 of file adapter_backendfunctions.py.
Referenced by DataReaderWriter.__exit__().
| DDR_ErrorCode ddr_getdatachunk | ( | Handle | dataHandle, |
| int | chunkOffset, | ||
| ValueHandle | value | ||
| ) |
Read a single 32-bit value at the given offset in the memory block indicated by the specified handle.
| dataHandle | Handle to a previously opened memory block as obtained from the ddr_openmemoryblock() function. |
| chunkOffset | Offset into the memory block from which to get the value (range is 0 to DDR_MAX_OFFSET-1). |
| value | Returns the requested value. |
Definition at line 150 of file adapter_backendfunctions.py.
Referenced by DataReaderWriter.Read(), and DataReaderWriter.Write().
| DDR_ErrorCode ddr_getmemorysize | ( | Handle | dataHandle, |
| ValueHandle | memorySizeInChunks | ||
| ) |
Retrieve the number of chunks in the memory block indicated by the handle to the successfully opened memory block.
| dataHandle | Handle to a previously opened memory block as obtained from the ddr_openmemoryblock() function. |
| memorySizeInChunks | Returns the number of 32-bit chunks in the memory block. |
Definition at line 128 of file adapter_backendfunctions.py.
Referenced by DataReaderWriter.__enter__().
| DDR_ErrorCode ddr_openmemoryblock | ( | blockName, | |
| Handle | dataHandle | ||
| ) |
Open access to a memory block for exclusive use, given the name of the memory block.
Use ddr_closememoryblock() to release access to the memory block.
| blockName | Name of the block to access (one of the predefined names, BLOCK_NAME_0, BLOCK_NAME_1, or BLOCK_NAME_2) |
| dataHandle | Returns a handle to be used for accessing the specific memory block. |
Definition at line 95 of file adapter_backendfunctions.py.
Referenced by DataReaderWriter.__enter__().
| DDR_ErrorCode ddr_setdatachunk | ( | Handle | dataHandle, |
| int | chunkOffset, | ||
| int | value | ||
| ) |
Writes a single 32-bit value to the given offset in the memory block indicated by the specified handle.
| dataHandle | Handle to a previously opened memory block as obtained from the ddr_openmemoryblock() function. |
| chunkOffset | Offset into the memory block to which to set the value (range is 0 to DDR_MAX_OFFSET-1). |
| value | The value to write to the memory block |
Definition at line 172 of file adapter_backendfunctions.py.
Referenced by DataReaderWriter.Write().
| cdll adapter_backend = cdll.LoadLibrary(dll_path) |
Instance of a CDLL object representing the loaded Adapter_BackEnd DLL.
Definition at line 78 of file adapter_backendfunctions.py.
| str BLOCK_NAME_0 = "gorp" |
Name of the first block.
Definition at line 35 of file adapter_backendfunctions.py.
| str BLOCK_NAME_1 = "baba" |
Name of the second block.
Definition at line 38 of file adapter_backendfunctions.py.
| str BLOCK_NAME_2 = "yaga" |
Name of the third block.
Definition at line 41 of file adapter_backendfunctions.py.
| int DDR_MAX_OFFSET = 32 |
All offsets must from 0 to 1 less than this value.
Definition at line 32 of file adapter_backendfunctions.py.
| os dll_path = os.path.join(os.path.dirname(__file__), "Adapter_BackEnd") |
Path to the Adapter_BackEnd DLL that will be loaded by ctypes.
The DLL is located in the same directory as this file.
Definition at line 73 of file adapter_backendfunctions.py.
| else : |
Definition at line 74 of file adapter_backendfunctions.py.