Class TcoDataExchange
Provides a mechanism to exchange data between PLC and an arbitrary data repository.
TcoDataExchange support Create, Read, Update, Delete (CRUD) operations and some additional
functions.
TcoDataExchange operates by convention on data member named _data
declared in the function block.
The _data
member must be of type that extends TcoData.TcoEntity
.
TcoDataEchange must be then inizialized in the higher level application where the repository
and remote data exchange is configured.
information
Inxton is required for this feature to work.
Inheritance
System.Object
TcoDataExchange
Implements
Vortex.Connector.Identity.IVortexIdentity
Vortex.Connector.IVortexObject
Vortex.Connector.ITwinObject
Vortex.Connector.IVortexElement
Vortex.Connector.IVortexOnlineObject
Vortex.Connector.IVortexShadowObject
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: TcoDataConnector.dll
Syntax
[TypeMetaDescriptor("{attribute addProperty Name \"\" }", "TcoDataExchange", "TcoData", TypeComplexityEnum.Complex)]
public class TcoDataExchange : TcoObject, IVortexIdentity, IsTcoObject, IVortexObject, ITwinObject, IVortexElement, ITcoDataExchange, ITcoObject, IShadowTcoDataExchange, IShadowTcoObject, IVortexOnlineObject, IVortexShadowObject
Examples
// Function block for data maipulation must extend from TcoData.TcoDataExchange.
FUNCTION_BLOCK TcoDataManager EXTENDS TcoData.TcoDataExchange
VAR
// This is the structure that contains the actual data we will work with. The `STRUCT` must extend `TcoData.TcoEntity`
_data : SandboxData;
END_VAR
// IMPLEMENTATION BODY OF FUNCTION BLOCK
// IMPORTANT: SUPER CALL HERE IS REQUIRED TO CALL THE DATA MANAGER TASKS!!!
SUPER^();
// DATA STRUCTURE ELIGIBLE FOR USE WITH TcoDataExchange.
TYPE
SandboxData EXTENDS TcoData.TcoEntity :
STRUCT
sampleData : SampleDataStructure;
someInteger : INT;
someString : STRING;
END_STRUCT
END_TYPE
repository = new MongoDbRepository<PlainSandboxData>
(new MongoDbRepositorySettings<PlainSandboxData>("mongodb://localhost:27017", "MyExampleDatabase", "MyExampleCollection"));
Entry.TcoDataTests.MAIN.sandbox.DataManager.InitializeRepository(repository);
Entry.TcoDataTests.MAIN.sandbox.DataManager.InitializeRemoteDataExchange();
Constructors
|
Improve this Doc
View Source
TcoDataExchange()
Declaration
|
Improve this Doc
View Source
TcoDataExchange(IVortexObject, String, String)
Declaration
public TcoDataExchange(IVortexObject parent, string readableTail, string symbolTail)
Parameters
Type |
Name |
Description |
Vortex.Connector.IVortexObject |
parent |
|
System.String |
readableTail |
|
System.String |
symbolTail |
|
Fields
|
Improve this Doc
View Source
__createOrUpdateTask
Declaration
TcoDataTask __createOrUpdateTask
Field Value
|
Improve this Doc
View Source
__createTask
Declaration
Field Value
|
Improve this Doc
View Source
__deleteTask
Declaration
Field Value
|
Improve this Doc
View Source
__idExistsTask
Declaration
TcoExistsTask __idExistsTask
Field Value
|
Improve this Doc
View Source
__readTask
Declaration
Field Value
|
Improve this Doc
View Source
__updateTask
Declaration
Field Value
|
Improve this Doc
View Source
_onliner
Declaration
Field Value
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
_onlinerVortex
Declaration
IVortexObject _onlinerVortex
Field Value
Type |
Description |
Vortex.Connector.IVortexObject |
|
|
Improve this Doc
View Source
_repository
Declaration
Field Value
Properties
|
Improve this Doc
View Source
_createOrUpdateTask
Instance of task that creates inexisting or updates existing
record in the repository.
Declaration
public TcoDataTask _createOrUpdateTask { get; }
Property Value
|
Improve this Doc
View Source
_createTask
Instance of task that creates
the entry into repository.
Declaration
public TcoDataTask _createTask { get; }
Property Value
|
Improve this Doc
View Source
_deleteTask
Instance of task that deletes
record from the repository.
Declaration
public TcoDataTask _deleteTask { get; }
Property Value
|
Improve this Doc
View Source
_idExistsTask
Instance of task that check for existence
of a record with an id
in the repository.
Declaration
public TcoExistsTask _idExistsTask { get; }
Property Value
|
Improve this Doc
View Source
_readTask
Instance of task that reads
the entry from repository.
Declaration
public TcoDataTask _readTask { get; }
Property Value
|
Improve this Doc
View Source
_updateTask
Instance of task that updates
record in the repository.
Declaration
public TcoDataTask _updateTask { get; }
Property Value
|
Improve this Doc
View Source
Onliner
Declaration
protected dynamic Onliner { get; }
Property Value
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
OnlinerVortex
Declaration
protected IVortexObject OnlinerVortex { get; }
Property Value
Type |
Description |
Vortex.Connector.IVortexObject |
|
Methods
|
Improve this Doc
View Source
CopyPlainToShadow(PlainTcoDataExchange)
Declaration
public void CopyPlainToShadow(PlainTcoDataExchange source)
Parameters
|
Improve this Doc
View Source
Create()
Declaration
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CreateOrUpdate()
Declaration
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CreatePlainerType()
Declaration
public PlainTcoDataExchange CreatePlainerType()
Returns
|
Improve this Doc
View Source
CreatePlainerType(PlainTcoDataExchange)
Declaration
protected PlainTcoDataExchange CreatePlainerType(PlainTcoDataExchange cloned)
Parameters
Returns
|
Improve this Doc
View Source
Delete()
Declaration
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Exists()
Declaration
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
FlushOnlineToPlain(PlainTcoDataExchange)
Declaration
public void FlushOnlineToPlain(PlainTcoDataExchange source)
Parameters
|
Improve this Doc
View Source
FlushOnlineToShadow()
Declaration
public void FlushOnlineToShadow()
|
Improve this Doc
View Source
FlushPlainToOnline(PlainTcoDataExchange)
Declaration
public void FlushPlainToOnline(PlainTcoDataExchange source)
Parameters
|
Improve this Doc
View Source
FlushShadowToOnline()
Declaration
public void FlushShadowToOnline()
|
Improve this Doc
View Source
GetRepository()
Declaration
public IRepository GetRepository()
Returns
|
Improve this Doc
View Source
GetRepository<T>()
Declaration
public IRepository<T> GetRepository<T>()
where T : IBrowsableDataObject
Returns
Type Parameters
|
Improve this Doc
View Source
InitializeRemoteDataExchange()
Declaration
public void InitializeRemoteDataExchange()
|
Improve this Doc
View Source
InitializeRemoteDataExchange<T>(IRepository<T>)
Declaration
public void InitializeRemoteDataExchange<T>(IRepository<T> repository)
where T : IBrowsableDataObject
Parameters
Type Parameters
|
Improve this Doc
View Source
InitializeRepository<T>(IRepository)
Declaration
public void InitializeRepository<T>(IRepository repository)
where T : IBrowsableDataObject
Parameters
Type Parameters
|
Improve this Doc
View Source
InitializeRepository<T>(IRepository<T>)
Declaration
public void InitializeRepository<T>(IRepository<T> repository)
where T : IBrowsableDataObject
Parameters
Type Parameters
|
Improve this Doc
View Source
LazyOnlineToShadow()
Declaration
public void LazyOnlineToShadow()
|
Improve this Doc
View Source
LazyShadowToOnline()
Declaration
public void LazyShadowToOnline()
|
Improve this Doc
View Source
PexConstructor(IVortexObject, String, String)
Declaration
void PexConstructor(IVortexObject parent, string readableTail, string symbolTail)
Parameters
Type |
Name |
Description |
Vortex.Connector.IVortexObject |
parent |
|
System.String |
readableTail |
|
System.String |
symbolTail |
|
|
Improve this Doc
View Source
PexConstructorParameterless()
Declaration
void PexConstructorParameterless()
|
Improve this Doc
View Source
PexPreConstructor(IVortexObject, String, String)
Declaration
void PexPreConstructor(IVortexObject parent, string readableTail, string symbolTail)
Parameters
Type |
Name |
Description |
Vortex.Connector.IVortexObject |
parent |
|
System.String |
readableTail |
|
System.String |
symbolTail |
|
|
Improve this Doc
View Source
PexPreConstructorParameterless()
Declaration
void PexPreConstructorParameterless()
|
Improve this Doc
View Source
Read()
Declaration
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Update()
Declaration
Returns
Type |
Description |
System.Boolean |
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IShadowTcoDataExchange._createOrUpdateTask
Declaration
IShadowTcoDataTask IShadowTcoDataExchange._createOrUpdateTask { get; }
Returns
|
Improve this Doc
View Source
IShadowTcoDataExchange._createTask
Declaration
IShadowTcoDataTask IShadowTcoDataExchange._createTask { get; }
Returns
|
Improve this Doc
View Source
IShadowTcoDataExchange._deleteTask
Declaration
IShadowTcoDataTask IShadowTcoDataExchange._deleteTask { get; }
Returns
|
Improve this Doc
View Source
IShadowTcoDataExchange._idExistsTask
Declaration
IShadowTcoExistsTask IShadowTcoDataExchange._idExistsTask { get; }
Returns
|
Improve this Doc
View Source
IShadowTcoDataExchange._readTask
Declaration
IShadowTcoDataTask IShadowTcoDataExchange._readTask { get; }
Returns
|
Improve this Doc
View Source
IShadowTcoDataExchange._updateTask
Declaration
IShadowTcoDataTask IShadowTcoDataExchange._updateTask { get; }
Returns
|
Improve this Doc
View Source
ITcoDataExchange._createOrUpdateTask
Declaration
ITcoDataTask ITcoDataExchange._createOrUpdateTask { get; }
Returns
|
Improve this Doc
View Source
ITcoDataExchange._createTask
Declaration
ITcoDataTask ITcoDataExchange._createTask { get; }
Returns
|
Improve this Doc
View Source
ITcoDataExchange._deleteTask
Declaration
ITcoDataTask ITcoDataExchange._deleteTask { get; }
Returns
|
Improve this Doc
View Source
ITcoDataExchange._idExistsTask
Declaration
ITcoExistsTask ITcoDataExchange._idExistsTask { get; }
Returns
|
Improve this Doc
View Source
ITcoDataExchange._readTask
Declaration
ITcoDataTask ITcoDataExchange._readTask { get; }
Returns
|
Improve this Doc
View Source
ITcoDataExchange._updateTask
Declaration
ITcoDataTask ITcoDataExchange._updateTask { get; }
Returns
Implements
Vortex.Connector.Identity.IVortexIdentity
Vortex.Connector.IVortexObject
Vortex.Connector.ITwinObject
Vortex.Connector.IVortexElement
Vortex.Connector.IVortexOnlineObject
Vortex.Connector.IVortexShadowObject
See Also