Click or drag to resize

Demo3D.PLC.Comms Namespace

The Demo3D.PLC.Comms namespace provides a set of built-in Demo3D communication protocols.
Classes
 ClassDescription
Public classAccessParameters Parameters for accessing a PLC tag or memory address.
Public classAlignment Directs field memory layout / alignment.
Public classAlignmentPacked A class to help with sequential field memory layout / alignment. Aligns bits on bit boundaries, and all else on byte boundaries.
Public classAlignmentSequential A class to help with sequential field memory layout / alignment.
Public classAlignmentSequential16 A class to help with sequential field memory layout / alignment. Aligns bits and bytes on their respective boundaries, and larger types on 16-bit boundaries.
Public classAlignmentSequential32 A class to help with sequential field memory layout / alignment. Aligns bits, bytes, and Int16 on their respective boundaries, and larger types on 32-bit boundaries.
Public classAlignmentSequential64 A class to help with sequential field memory layout / alignment. Aligns bits, bytes, Int16 and Int32 on their respective boundaries, and larger types on 64-bit boundaries.
Public classBrowseItemBase Base implmentation of IBrowseItem.
Public classBrowseItemBranch A base class for implementing a symbol table branch.
Public classBrowseItemExtensions Extension methods for IBrowseItem.
Public classBufferDataConverterContext Used by BufferDataConverter, this class provides the context of a conversion.
Public classBufferDataConverterContextProvider Used by BufferDataConverter, this class provides the context of a conversion, and is its own context provider.
Public classBufferDataMarshaller A marshaller for marshalling and unmarshalling a specified data type to/from memory.
Public classBufferMarshaller A class for marshalling/unmarshalling objects into memory.
Public classBufferMarshallerT A class for marshalling/unmarshalling objects into memory.
Public classConnectionPointExtensions IConnectionPoint extensions.
Public classConversionFunction A conversion function returned from GetConvertFrom(IDataContextProvider, DataType, DataType) or GetConvertTo(IDataContextProvider, DataType, DataType).
Public classDataArrayT A data array.
Public classDataArrayBounds The bounds of one dimension of an array.
Public classDataContextProvider Provides extensions to IDataContextProvider.
Public classDataConverter Provides a unified way of converting types of values to other types.
Public classDataConverterAttribute Specifies what type to use as a converter for the object this attribute is bound to.
Public classDataDimension One (multi-dimensional) array.
Public classDataStruct A dynamic data structure.
Public classDataStructIgnoreAttribute Determines if a member is ignored when the containing class is converted to/from a DataStruct.
Public classDataType Describes a data type, either a .Net System.Type or dynamic type that may have no .Net Type equivalent.
Public classDataTypeBuilder Dynamic structure builder.
Public classDataTypeFieldItem A field definition for the dynamic structure builder (see DataTypeBuilder).
Public classDataTypeMemoryLayout Returns the field offset and size for fields of a structure. (Describes just one element for an array type.)
Public classFieldDescriptor One field of a structure.
Public classFieldOffsetBitsAttribute Specifies the offset into a structure of a field (in bits).
Public classFieldSizeBitsAttribute Specifies the size of a field (in bits).
Public classMemoryAddress A memory address.
Protected classMemoryAddressMemoryAddressConverterAddressType A base data type converter.
Public classMemorySymbolTableAddressType A class for constructing symbol tables for servers that are primarily accessed with memory addresses.
Public classMessageContextBase Optional information about a request received.
Public classMetaProperties Non-standard properties.
Public classMetaPropertyDatabase Database of non-standard properties.
Public classMetaPropertyDescriptor Description of a non-standard property.
Public classStringAddress An address that supports a string representation.
Public classTypedMemoryAddress A strongly typed PLC specific memory address.
Public classVectoredRequest A vectored request.
Public classVectoredRequests A vector of requests which can be executed multiple times.
Structures
 StructureDescription
Public structureAddressArea Describes an addressable area within an address space.
Public structureDataArrayTIndexRange Index range of elements that changed.
Public structureDataArrayTValueChange Previous value of an element that changed.
Public structureDataValue A weekly-typed timestamped data value.
Public structureDataValueT A strongly-typed timestamped data value.
Public structureDeltaValue A data value.
Interfaces
 InterfaceDescription
Public interfaceIAddress An address of some sort.
Public interfaceIAddressSpace Memory address space identifier.
Public interfaceIAddressTranslatorService Translator service for mapping from one IAddress to another IAddress.
Public interfaceIBrowseItem A browsable item, usually representing a symbol in the PLC symbol table. Can optionally also implement IBrowseItemDescription.
Public interfaceIBrowseItemDescription Extensions to the core IBrowseItem to provide more detail.
Public interfaceIConnectionPoint A single connection point.
Public interfaceIDataContextProvider Provides contextual information for a data conversion using DataConverter.
Public interfaceIDataRefreshService

Connections created through the IO browser will always try to refresh cached data on model connection or reset. This is essential for PLC protocol implementations, as it ensures that there are no data discrepancies between the PLC and the model.

This causes issues for protocols that don't always need this functionality, such as stateless protocols where data exchanges are processed in isolation. This service allows protocol implementations to have control over this functionality.

Public interfaceIListExt Extensions to IList.
Public interfaceIModifySymbolTable An interface for modifying a symbol table.
Public interfaceINotifySymbolTable Notifies when the symbol table changes.
Public interfaceIOffloadingService A protocol that implements this service agrees to offload write requests.
Public interfaceIReplaceSymbolTable An interface for replacing the symbol table.
Public interfaceISymbolTable An interface for providing access to a symbol table.
Public interfaceISynchronizedCoSimulator A service that offers an ICoSimulator and an ISynchronizedIOService.
Public interfaceISynchronizedIOService A service for controlling when IO occurs.
Delegates
 DelegateDescription
Public delegateConversionDelegate Conversion function.
Public delegateIOAsyncDelegateT Delegate for IO with the peer.
Public delegateIOBeforeHandler Delegate to execute before an IO event.
Public delegateIOErrorHandler Delegate for notifying an error.
Public delegateIOSuccessHandler Delegate for indicating IO success.
Enumerations
 EnumerationDescription
Public enumerationAccessRights Whether a data item can be read or written.
Public enumerationActivatorFlags Flags for CreateInstance.
Public enumerationBrowseFlags Browse control flags.
Protected enumerationBrowseItemBaseSearchFlags Search control flags.
Public enumerationCanModifySymbolFlags Flags describing how a symbol can be modified.
Public enumerationCanReadSymbolsFlags Flags describing whether and how to read the symbol table.
Public enumerationDataTypeConvertibleFlags Flags for specifying acceptable conversions.
Public enumerationIOControl Cache and IO control flags.
Public enumerationPlcFlags Flags specific to PLC connections.
Remarks

Support for server connectivity is broadly split between Tag and Memory servers; reflecting the primary concepts that the server exposes for accessing its data.

Tag

Tag-based servers expose PLC data-points as explicit tags. They tend first to expose their symbol table detailing all the tags that the client can access, and then offer some API or protocol for the client to access tags. Examples include EtherNet/IP CIP Class 3, OPC (UA and DA), and BR Automation PVI.

See Demo3D.PLC.Comms.Builtin for an example implementation of a tag server.

Memory

Memory-based servers expose raw PLC memory, allowing the client (Demo3D) to read and write bytes of data direct to/from the memory in the PLC. Examples include Modbus, Siemens S7 Functions, and Beckhoff TwinCAT ADS. These servers may also expose a symbol table, where the symbols in the table are just a mapping from symbol name to memory address, and the underlying access is still directly to memory in the PLC.

See Demo3D.PLC.Comms.Builtin for an example implementation of a memory server.

List of services:

AccessInterfaceDescription
CommonIAddressTranslatorServiceA service for translating one address to another.
ISymbolTableProvides access to a symbol table.
INotifySymbolTableProvides access to a symbol table, and notifies when the symbol table changes.
ISynchronizedIOServiceControls when IO occurs.
IOffloadingServiceA protocol that agrees to offload write requests..
Direct TagIDirectTagAccessServiceSimplified tag client interface.
INotifyDirectTagAccessServiceSimplified tag client interface for a peer that will notify when tag values change.
TagITagServiceProvides tag access to the peer.
IDirectTagServiceProvides direct tag access to the peer, bypassing any caches.
INotifyTagServiceProvided cached access to tags in a peer that will notify when tag values change.
Direct MemoryIDirectMemoryAccessServiceSimplified memory client interface.
INotifyDirectMemoryAccessServiceSimplified memory client interface to a peer that will notify when memory changes.
MemoryIMemoryServiceProvides access to memory in the peer.
MemoryIMemoryPartitioningServiceControls access to memory in the peer.
IDirectMemoryServiceProvides direct access to memory in the peer, bypassing any caches.
INotifyMemoryServiceProvides access to the memory in a peer that will notify when the data at the address changes.