Represents some P/Invoke functions for accessing a named blocks of memory to read/write data in the Adapter_BackEnd.dll.
More...
|
const int | DDR_MAX_OFFSET = 32 |
| All offsets must from 0 to 1 less than this value.
|
|
const string | BLOCK_NAME_0 = "gorp" |
| Define the name of BLOCK 0 that can be accessed in the Adapter_BackEnd.dll. In C#'s P/Invoke, it is not possible to map a string data through P/Invoke, only methods.
|
|
const string | BLOCK_NAME_1 = "baba" |
| Define the name of BLOCK 1 that can be accessed in the Adapter_BackEnd.dll. In C#'s P/Invoke, it is not possible to map a string data through P/Invoke, only methods.
|
|
const string | BLOCK_NAME_2 = "yaga" |
| Define the name of BLOCK 2 that can be accessed in the Adapter_BackEnd.dll. In C#'s P/Invoke, it is not possible to map a string data through P/Invoke, only methods.
|
|
|
static DDR_ErrorCode | DDR_OpenMemoryBlock (string blockName, out Int32 dataHandle) |
| P/Invoke wrapper that opens access to a memory block for exclusive use, given the name of the memory block.
|
|
static DDR_ErrorCode | DDR_CloseMemoryBlock (Int32 dataHandle) |
| P/Invoke wrapper that closes access to a previously opened memory block, thus releasing it for others to open.
|
|
static DDR_ErrorCode | DDR_GetMemorySize (Int32 dataHandle, out Int32 memorySizeInChunks) |
| P/Invoke wrapper that retrieves the number of chunks in the memory block indicated by the handle to the successfully opened memory block.
|
|
static DDR_ErrorCode | DDR_GetDataChunk (Int32 dataHandle, Int32 chunkOffset, out UInt32 value) |
| P/Invoke wrapper that reads a single 32-bit value at the given offset in the memory block indicated by the specified handle.
|
|
static DDR_ErrorCode | DDR_SetDataChunk (Int32 dataHandle, Int32 chunkOffset, UInt32 value) |
| P/Invoke wrapper that writes a single 32-bit value to the given offset in the memory block indicated by the specified handle.
|
|
|
const string | dll = "Adapter_BackEnd" |
|
Represents some P/Invoke functions for accessing a named blocks of memory to read/write data in the Adapter_BackEnd.dll.
Definition at line 24 of file Adapter_BackEndFunctions.cs.
◆ DDR_ErrorCode
Represents the possible errors that can be returned from the memory block access functions. It is not possible to use C#'s P/Invoke to get these values so the enumeration needs to be duplicated here.
Enumerator |
---|
DDR_ErrorCode_Success | Operation succeeded.
|
DDR_ErrorCode_Block_Already_Opened | Memory block is already open and cannot be opened again.
|
DDR_ErrorCode_Block_Not_Opened | Memory block is closed and cannot be accessed.
|
DDR_ErrorCode_Invalid_Block_Name | The given name is not a recognized memory block name.
|
DDR_ErrorCode_Invalid_Handle | The handle argument does not correspond to a valid open memory block.
|
DDR_ErrorCode_Invalid_Offset | The given offset is out of bounds.
|
DDR_ErrorCode_Null_Argument | The block name pointer or return handle pointer argument is NULL.
|
Definition at line 37 of file Adapter_BackEndFunctions.cs.
◆ DDR_CloseMemoryBlock()
P/Invoke wrapper that closes access to a previously opened memory block, thus releasing it for others to open.
- Parameters
-
dataHandle | Handle to a previously opened memory block as obtained from the DDR_OpenMemoryBlock() function. |
- Returns
- Returns a value from the DDR_ErrorCode enumeration indicating success or failure.
Referenced by DataReaderWriter.Dispose().
◆ DDR_GetDataChunk()
static DDR_ErrorCode DDR_GetDataChunk |
( |
Int32 |
dataHandle, |
|
|
Int32 |
chunkOffset, |
|
|
out UInt32 |
value |
|
) |
| |
|
package |
P/Invoke wrapper that reads a single 32-bit value at the given offset in the memory block indicated by the specified handle.
- Parameters
-
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 valued. |
- Returns
- Returns a value from the DDR_ErrorCode enumeration indicating success or failure.
◆ DDR_GetMemorySize()
static DDR_ErrorCode DDR_GetMemorySize |
( |
Int32 |
dataHandle, |
|
|
out Int32 |
memorySizeInChunks |
|
) |
| |
|
package |
P/Invoke wrapper that retrieves the number of chunks in the memory block indicated by the handle to the successfully opened memory block.
- Parameters
-
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. |
- Returns
- Returns a value from the DDR_ErrorCode enumeration indicating success or failure.
Referenced by DataReaderWriter.DataReaderWriter().
◆ DDR_OpenMemoryBlock()
static DDR_ErrorCode DDR_OpenMemoryBlock |
( |
string |
blockName, |
|
|
out Int32 |
dataHandle |
|
) |
| |
|
package |
P/Invoke wrapper that opens access to a memory block for exclusive use, given the name of the memory block.
- Parameters
-
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. |
- Returns
- Returns a value from the DDR_ErrorCode enumeration indicating success or failure.
Referenced by DataReaderWriter.DataReaderWriter().
◆ DDR_SetDataChunk()
static DDR_ErrorCode DDR_SetDataChunk |
( |
Int32 |
dataHandle, |
|
|
Int32 |
chunkOffset, |
|
|
UInt32 |
value |
|
) |
| |
|
package |
P/Invoke wrapper that writes a single 32-bit value to the given offset in the memory block indicated by the specified handle.
- Parameters
-
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 |
- Returns
- Returns a value from the DDR_ErrorCode enumeration indicating success or failure.
◆ BLOCK_NAME_0
const string BLOCK_NAME_0 = "gorp" |
|
static |
Define the name of BLOCK 0 that can be accessed in the Adapter_BackEnd.dll. In C#'s P/Invoke, it is not possible to map a string data through P/Invoke, only methods.
Definition at line 53 of file Adapter_BackEndFunctions.cs.
◆ BLOCK_NAME_1
const string BLOCK_NAME_1 = "baba" |
|
static |
Define the name of BLOCK 1 that can be accessed in the Adapter_BackEnd.dll. In C#'s P/Invoke, it is not possible to map a string data through P/Invoke, only methods.
Definition at line 59 of file Adapter_BackEndFunctions.cs.
◆ BLOCK_NAME_2
const string BLOCK_NAME_2 = "yaga" |
|
static |
Define the name of BLOCK 2 that can be accessed in the Adapter_BackEnd.dll. In C#'s P/Invoke, it is not possible to map a string data through P/Invoke, only methods.
Definition at line 65 of file Adapter_BackEndFunctions.cs.
◆ DDR_MAX_OFFSET
const int DDR_MAX_OFFSET = 32 |
|
static |
◆ dll
const string dll = "Adapter_BackEnd" |
|
staticprivate |
The documentation for this class was generated from the following file: