Interface ITwinObject
Basic contract for any complex object that is product of build process.
Inherited Members
Namespace: AXSharp.Connector
Assembly: AXSharp.Connector.dll
Syntax
public interface ITwinObject : ITwinElement
Methods
| Edit this page View SourceAddChild(ITwinObject)
Adds child object to the list of children of this object. GetChildren()
note
This method is used by the objects built in building process. Not to be used by framework consumers.
Declaration
void AddChild(ITwinObject twinObject)
Parameters
| Type | Name | Description |
|---|---|---|
| ITwinObject | twinObject | Child ITwinObject |
AddKid(ITwinElement)
Adds kid object to the list of kids of this object.
note
This method is used by the objects built in building process. Not to be used by framework consumers.
Declaration
void AddKid(ITwinElement kid)
Parameters
| Type | Name | Description |
|---|---|---|
| ITwinElement | kid | Child ITwinElement |
AddValueTag(ITwinPrimitive)
Adds child value tag to the list of value tags of this object. GetValueTags()
note
This method is used by the objects built in building process. Not to be used by framework consumers.
Declaration
void AddValueTag(ITwinPrimitive twinPrimitive)
Parameters
| Type | Name | Description |
|---|---|---|
| ITwinPrimitive | twinPrimitive | Child ITwinPrimitive |
AnyChangeAsync<T>(T)
Compares if the current plain object has changed from the previous object.This method is used by the framework to determine if the object has changed and needs to be updated. [!NOTE] Any member in the hierarchy that is ignored by the compilers (e.g. when CompilerOmitAttribute is used) will not be compared, and therefore will not be detected as changed.
Declaration
Task<bool> AnyChangeAsync<T>(T plain)
Parameters
| Type | Name | Description |
|---|---|---|
| T | plain |
Returns
| Type | Description |
|---|---|
| Task<bool> |
Type Parameters
| Name | Description |
|---|---|
| T |
GetChildren()
Gets all complex object that are created by this instance.
Declaration
IEnumerable<ITwinObject> GetChildren()
Returns
| Type | Description |
|---|---|
| IEnumerable<ITwinObject> |
GetConnector()
Gets the instance of the Connector class to which this ITwinObject belongs.
Declaration
Connector GetConnector()
Returns
| Type | Description |
|---|---|
| Connector | Connector |
GetKids()
Gets kids of this instance.
Declaration
IEnumerable<ITwinElement> GetKids()
Returns
| Type | Description |
|---|---|
| IEnumerable<ITwinElement> |
GetValueTags()
Get all base type objects (tags) that are created by this instance.
Declaration
IEnumerable<ITwinPrimitive> GetValueTags()
Returns
| Type | Description |
|---|---|
| IEnumerable<ITwinPrimitive> |
OnlineToPlain<T>()
Reads online data and retrieved POCO object populated with actual online data.
Declaration
Task<T> OnlineToPlain<T>()
Returns
| Type | Description |
|---|---|
| Task<T> | POCO with online data of this object |
Type Parameters
| Name | Description |
|---|---|
| T |
PlainToOnline<T>(T)
Writes data from POCO object to online data (PLC)
Declaration
Task PlainToOnline<T>(T plain)
Parameters
| Type | Name | Description |
|---|---|---|
| T | plain | POCO object to be written to the controller. |
Returns
| Type | Description |
|---|---|
| Task |
Type Parameters
| Name | Description |
|---|---|
| T |
PlainToShadow<T>(T)
Writes data from POCO object to shadow data of this object.
Declaration
Task PlainToShadow<T>(T plain)
Parameters
| Type | Name | Description |
|---|---|---|
| T | plain | POCO object to be written to the shadows of this object. |
Returns
| Type | Description |
|---|---|
| Task |
Type Parameters
| Name | Description |
|---|---|
| T |
ShadowToPlain<T>()
Read data from shadows of this object to a new instance of a POCO object.
Declaration
Task<T> ShadowToPlain<T>()
Returns
| Type | Description |
|---|---|
| Task<T> | POCO object populated by data from the shadows of this object. |
Type Parameters
| Name | Description |
|---|---|
| T |