The wrapper for the Adapter_BackEnd DLL containing functions used in the Adapter Pattern. More...
Go to the source code of this file.
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... | |
Namespaces | |
| namespace | DesignPatternExamples_python |
| The DesignPatternExamples_python package, containing 20 examples of design patterns, each in their own namespace. | |
| namespace | DesignPatternExamples_python.adapter |
| namespace | DesignPatternExamples_python.adapter.adapter_backendfunctions |
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. | |
The wrapper for the Adapter_BackEnd DLL containing functions used in the Adapter Pattern.
Definition in file adapter_backendfunctions.py.