IDirectMemoryAccessService Interface |
Namespace: Demo3D.PLC.Comms.Memory
public interface IDirectMemoryAccessService
The IDirectMemoryAccessService type exposes the following members.
| Name | Description | |
|---|---|---|
| AddressType |
The type of address expected by this service. The type must implement IAddress.
| |
| PduSize |
Get the PDU size (or -1).
| |
| RequestOverhead |
A measure in bytes of the overhead of creating a new "read" request (or -1).
|
| Name | Description | |
|---|---|---|
| GetPreferredAddress |
Returns the preferred access to the address space.
The underlying protocol may prefer the user to access more data than addressed.
| |
| GetPreferredParameters |
Parameters to be applied to accesses.
| |
| GetRequiredAddress |
Returns the required access to the address space.
The underlying protocol may require the user to access more data than addressed.
| |
| InternalReadV |
Vectored block read to the peer.
| |
| InternalWriteV |
Vectored block write to the peer.
|
| Name | Description | |
|---|---|---|
| ReadV |
Vectored read request.
(Defined by DirectMemoryAccessService.) | |
| WriteV |
Vectored write request.
(Defined by DirectMemoryAccessService.) |
This interface is intended to simplify the implementation of new memory-based protocols/connections, and not as a primary method of accessing the PLC. Consider using IMemoryService instead to access memory in a PLC.
IMemoryService has several advantages when accessing PLC memory. By accessing memory through GetAddress(IAddress, AccessParameters, Object) it forces the caller to be explicit about the addresses that are being accessed. This allows algorithms to build in-core memory caches, and to implement automatic notification when memory in the PLC changes. It also silently widens and batches memory read accesses to improve protocol performance.
Addresses passed to this services methods need not be exactly AddressType, but their AddressSpace must match.