Class TcoObject
Basic construction block from which all blocks of a TcOpen application should derive in order to take advantage of the framework.
This function block is abstract and must be implemented in a derived block.
TcoObject
, must be constructed via FB_init(ITcoObject)
method at instantiation.
TcoObjects
that belong to same TcoContext
share the same context.
This is typically achieved by constructing the object with FB_init(THIS^)
, where THIS^
is of ITcoObject
(note that ITcoContext also implements ITcoObject).
warning
Whenever it is required to pass function block parameters of a block type that derives from `TcoObject` it should be passed as **reference**.
This means either via appropriate interface or as `REFERENCE TO` in VAR_INPUT and VAR_OUTPUT sections or as VAR_IN_OUT.
Be aware the VAR_INPUT and VAR_OUTPUT create a copy of the variable.
Example
All the variables _myContext, _ContextTcoObjectA, _ContextTcoObjectB, _ContextChildTcoObject should have all the same value.
All the variables _myIdentity, _TcoObjectAidentity, _TcoObjectBidentity, _ChildTcoObjectidentity should have uniques values.
//Definition of the myTcoObject
FUNCTION_BLOCK myTcoObject EXTENDS TcoObject
VAR
_myChildTcoObject : myChildTcoObject(THIS^);
END_VAR
//Definition of the myTcoContext
FUNCTION_BLOCK myTcoContext EXTENDS TcoContext
VAR
_myTcoObjectA : myTcoObject(THIS^);
_myTcoObjectB : myTcoObject(_myTcoObjectA.Context);
_myContext : ITcoContext;
_ContextTcoObjectA : ITcoContext;
_ContextTcoObjectB : ITcoContext;
_ContextChildTcoObject : ITcoContext;
_myIdentity : ULINT;
_TcoObjectAidentity : ULINT;
_TcoObjectBidentity : ULINT;
_ChildTcoObjectidentity : ULINT;
END_VAR
//Plc code of the myTcoContext
_myContext := THIS^.Context;
_ContextTcoObjectA := _myTcoObjectA.Context;
_ContextTcoObjectB := _myTcoObjectB.Context;
_ContextChildTcoObject := _myTcoObjectB._myChildTcoObject.Context;
_myIdentity := THIS^.Identity;
_TcoObjectAidentity := _myTcoObjectA.Identity;
_TcoObjectBidentity := _myTcoObjectB.Identity;
_ChildTcoObjectidentity := _myTcoObjectB._myChildTcoObject.Identity;
Explanation
The context of the myTcoContext instance is assigned to itself. As the _myTcoObjectA context is assigned to this instance of the myTcoContext, it is assigned to the same context,
and the value of the _ContextTcoObjectA will be the same as the value of the _myContext.
The context of the _myTcoObjectB instance is assigned to the _myTcoObjectA, that has already assigned context to this instance of the myTcoContext.
So the value of the _ContextTcoObjectB will be the same as the values of the _ContextTcoObjectA and _myContext.
The context of the _myTcoObjectB._myChildTcoObject instance is assigned to the _myTcoObjectB, that has already assigned context to _myTcoObjectA,
that has already assigned its context to this instance of the myTcoContext.
So the value of the _ContextChildTcoObject wile be the same as the values _ContextTcoObjectB,_ContextTcoObjectA and _myContext.
As the Identities of all objects points to the themselves, all identities will have different values, as all objects are unique.
Inheritance
System.Object
TcoObject
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: TcoCoreConnector.dll
Syntax
[TypeMetaDescriptor("{attribute addProperty ToolTip \"\" } {attribute addProperty Name \"\" }", "TcoObject", "TcoCore", TypeComplexityEnum.Complex)]
public class TcoObject : IVortexIdentity, IsTcoObject, IVortexObject, ITwinObject, IVortexElement, ITcoObject, IShadowTcoObject, IVortexOnlineObject, IVortexShadowObject
Constructors
|
Improve this Doc
View Source
TcoObject()
Declaration
|
Improve this Doc
View Source
TcoObject(IVortexObject, String, String)
Declaration
public TcoObject(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
__Identity
Declaration
Field Value
Type |
Description |
Vortex.Connector.ValueTypes.OnlinerULInt |
|
|
Improve this Doc
View Source
__messenger
Declaration
Field Value
|
Improve this Doc
View Source
_context
Declaration
Field Value
|
Improve this Doc
View Source
_humanReadable
Declaration
protected string _humanReadable
Field Value
Type |
Description |
System.String |
|
Properties
|
Improve this Doc
View Source
_AttributeName
Declaration
string _AttributeName { }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
string _AttributeToolTip { }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
_Identity
Declaration
[RenderIgnore]
[ReadOnly]
[CompilerOmits(new string[]{"BuilderPlainer", "BuilderShadow"})]
public OnlinerULInt _Identity { get; }
Property Value
Type |
Description |
Vortex.Connector.ValueTypes.OnlinerULInt |
|
|
Improve this Doc
View Source
_messenger
Declaration
[RenderIgnore]
[CompilerOmits(new string[]{"BuilderPlainer", "BuilderShadow"})]
public TcoMessenger _messenger { get; }
Property Value
|
Improve this Doc
View Source
AttributeName
Declaration
public string AttributeName { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public string AttributeToolTip { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Children
Declaration
List<IVortexObject> Children { }
Property Value
Type |
Description |
System.Collections.Generic.List<Vortex.Connector.IVortexObject> |
|
|
Improve this Doc
View Source
Connector
Declaration
protected IConnector Connector { get; set; }
Property Value
Type |
Description |
Vortex.Connector.IConnector |
|
|
Improve this Doc
View Source
HumanReadable
Declaration
public string HumanReadable { get; protected set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Identity
Declaration
public OnlinerULInt Identity { get; }
Property Value
Type |
Description |
Vortex.Connector.ValueTypes.OnlinerULInt |
|
|
Improve this Doc
View Source
Kids
Declaration
List<IVortexElement> Kids { }
Property Value
Type |
Description |
System.Collections.Generic.List<Vortex.Connector.IVortexElement> |
|
|
Improve this Doc
View Source
MessageHandler
Gets 'Message Handler' for this object.
Declaration
public TcoObjectMessageHandler MessageHandler { get; }
Property Value
|
Improve this Doc
View Source
Parent
Declaration
protected IVortexObject Parent { get; set; }
Property Value
Type |
Description |
Vortex.Connector.IVortexObject |
|
|
Improve this Doc
View Source
Symbol
Declaration
public string Symbol { get; protected set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
SymbolTail
Declaration
protected string SymbolTail { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
List<IValueTag> ValueTags { }
Property Value
Type |
Description |
System.Collections.Generic.List<Vortex.Connector.IValueTag> |
|
Methods
|
Improve this Doc
View Source
AddChild(IVortexObject)
Declaration
public void AddChild(IVortexObject vortexObject)
Parameters
Type |
Name |
Description |
Vortex.Connector.IVortexObject |
vortexObject |
|
|
Improve this Doc
View Source
AddKid(IVortexElement)
Declaration
public void AddKid(IVortexElement vortexElement)
Parameters
Type |
Name |
Description |
Vortex.Connector.IVortexElement |
vortexElement |
|
|
Improve this Doc
View Source
AddValueTag(IValueTag)
Declaration
public void AddValueTag(IValueTag valueTag)
Parameters
Type |
Name |
Description |
Vortex.Connector.IValueTag |
valueTag |
|
|
Improve this Doc
View Source
CopyPlainToShadow(PlainTcoObject)
Declaration
public void CopyPlainToShadow(PlainTcoObject source)
Parameters
|
Improve this Doc
View Source
CreatePlainerType()
Declaration
public PlainTcoObject CreatePlainerType()
Returns
|
Improve this Doc
View Source
CreatePlainerType(PlainTcoObject)
Declaration
protected PlainTcoObject CreatePlainerType(PlainTcoObject cloned)
Parameters
Returns
|
Improve this Doc
View Source
FlushOnlineToPlain(PlainTcoObject)
Declaration
public void FlushOnlineToPlain(PlainTcoObject source)
Parameters
|
Improve this Doc
View Source
FlushOnlineToShadow()
Declaration
public void FlushOnlineToShadow()
|
Improve this Doc
View Source
FlushPlainToOnline(PlainTcoObject)
Declaration
public void FlushPlainToOnline(PlainTcoObject source)
Parameters
|
Improve this Doc
View Source
FlushShadowToOnline()
Declaration
public void FlushShadowToOnline()
|
Improve this Doc
View Source
GetChildren()
Declaration
public IEnumerable<IVortexObject> GetChildren()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Vortex.Connector.IVortexObject> |
|
|
Improve this Doc
View Source
GetConnector()
Declaration
public IConnector GetConnector()
Returns
Type |
Description |
Vortex.Connector.IConnector |
|
|
Improve this Doc
View Source
GetKids()
Declaration
public IEnumerable<IVortexElement> GetKids()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Vortex.Connector.IVortexElement> |
|
|
Improve this Doc
View Source
GetParent()
Declaration
public IVortexObject GetParent()
Returns
Type |
Description |
Vortex.Connector.IVortexObject |
|
|
Improve this Doc
View Source
GetSymbolTail()
Declaration
public string GetSymbolTail()
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public IEnumerable<IValueTag> GetValueTags()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Vortex.Connector.IValueTag> |
|
|
Improve this Doc
View Source
Init(IVortexObject)
Declaration
void Init(IVortexObject parent)
Parameters
Type |
Name |
Description |
Vortex.Connector.IVortexObject |
parent |
|
|
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()
Explicit Interface Implementations
|
Improve this Doc
View Source
IShadowTcoObject._Identity
Declaration
[RenderIgnore]
[ReadOnly]
[CompilerOmits(new string[]{"BuilderPlainer", "BuilderShadow"})]
IShadowULInt IShadowTcoObject._Identity { get; }
Returns
Type |
Description |
Vortex.Connector.ValueTypes.Shadows.IShadowULInt |
|
|
Improve this Doc
View Source
IShadowTcoObject._messenger
Declaration
[RenderIgnore]
[CompilerOmits(new string[]{"BuilderPlainer", "BuilderShadow"})]
IShadowTcoMessenger IShadowTcoObject._messenger { get; }
Returns
|
Improve this Doc
View Source
ITcoObject._Identity
Declaration
[RenderIgnore]
[ReadOnly]
[CompilerOmits(new string[]{"BuilderPlainer", "BuilderShadow"})]
IOnlineULInt ITcoObject._Identity { get; }
Returns
Type |
Description |
Vortex.Connector.ValueTypes.Online.IOnlineULInt |
|
|
Improve this Doc
View Source
ITcoObject._messenger
Declaration
[RenderIgnore]
[CompilerOmits(new string[]{"BuilderPlainer", "BuilderShadow"})]
ITcoMessenger ITcoObject._messenger { get; }
Returns
Implements
Vortex.Connector.Identity.IVortexIdentity
Vortex.Connector.IVortexObject
Vortex.Connector.ITwinObject
Vortex.Connector.IVortexElement
Vortex.Connector.IVortexOnlineObject
Vortex.Connector.IVortexShadowObject
See Also