Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design a way for wrapping OOP blocks into blocks with traditional interface. #28

Closed
PTKu opened this issue May 3, 2021 · 4 comments
Closed
Assignees

Comments

@PTKu
Copy link
Member

PTKu commented May 3, 2021

Prototype an example of wrapper class... + design testing and documentation.

Following discussion:

#13 (comment) and related

and
#13 (comment)
#21 (reply in thread)

@PTKu PTKu added the discussion label May 3, 2021
PTKu added a commit that referenced this issue May 12, 2021
* some more comments to corleone context/identity example

* sequencer example moved to 'Sequencer' folder

* Object tree viewer moved to TcoCore.Wpf library
Examples visulized with object tree viewer

* Object tree viewer moved to TcoCore.Wpf library
Examples visulized with object tree viewer

* (examples) sequencers have separate instances of components

* (examples) sequencers have not shared instances of components

* Links to code examples research

* merged with remote

* test publish in trx format

* #17 TcoSequencer.Step method protected, OnSequencerError() Sequencer.Reset() => Sequencer.Restore()

* TcoTask API docu, eTaskState refactoring, all tests passed, some comments in the test needs to be checked to fullfill the refatored values of the etskState.

* TcoTask._taskState=> Readonly

* TcoTask Enabled property added

* #12
Each object has its own messeger; post method for each main category, activ/inactive flag; unit tests

* TcoMessenger performance tests

* packages update 1.9.6-nightly.260

* Time sync research

* fix after update to 1.9.4-nightly.260, implementation of missing GetKids member in manually created IVortexObject wrapper (DynamicTreeView)

* fixed binding exception on 'TcoContextView'

* RTC

* TcoRTC + tests, Messenger tests timestamp modification

* TcoRtc + tests

* small cleanup in messenger test instance

* Output text logs to xml

* TcoRtc - Clock PRG removed, Update method implementation moved to TcoRtc FB

* rtc refactoring - start @TomKovac continues

* task example started, not finished yet

* TcoRtc diff in _messenger.Mime.Timestamp issue

* Messanger performence tests commented out due to Rtc issues~

* Rtc my fucking last attempt to solve this fucking issue

* minor clup

* before modyfying T801-T812 tests

* Messenger tests-added cyclicall call of the rtcupdate

* test publishing

* messaging feature and compatibility aligment

* task example

* solving compatibility issues VortexCore

* before sync

* #12 cont. messaging

* before restorer added

* restorer added + rtc issues

* get ready for nuget publish on TcOpenGroup config

* generated meta file removed from tracking

* removes generate and meta, fixed an issue with TcoCoreExamples slnf (missing project)

* add missing files to nuget TcoCore

* #23 net5.0 platform added, test projects kept on net48

* build script improvements
git version bump 0.4.0

* Changeable restorer removed

* package updates v1.10.0+

* TcoTaskExample added, also into the documentation

* prevent nre on missing context in messenger

* #36 method EqualsTo added to TcoObject

* removed super^ in TcoObject (some refactoring problem in tc3?)

* minor refac

* Fixed wording in documentation

Fixed wording in documentation of TcoObject.EqualsTo()

* Update TcoObjectTest.TcPOU

* remote nuget publishing at this point to prevent build and publish on each change in the PR Inxon/dev -> TcOpenGroup/dev

* #38 In addition to A.EqualsTo(B), B.EqualsTo(A) test case added.

* ignore .vscode folder

* #28 sStepforward, stepbackward restore call after reaching done state

* readme prior to PR to TcOpenGroup

* + repo structure description start

* #39 Invoke returns new ITcoTaskStatus interface + refactoring

* #41 add implementation and tests for messaging MinLevel, Suspend, Resume.

* additions to TcoContex, Messaging, TcoObject API documentation,

* Minor additions to TcoObject, TcoTask API documentation

* TcoSequencer, unexpected OnStateChange method call after changing from step mode to cyclic mode issue solved

* removed webinar submodule

* remove webinar reference from the solution file

* station example

* Display in the render tree in the order they occur and do not render ignored ones.

* Hiding implementation TcoCore.TcoSequencer #32 and TcoCore.TcoState #33

* TcoCequencer min max step id number

* TcoCore.TcoSequencer RequestStep is already able to jump to very first step of the sequence so as to stepId 0

* Min / max StepId changed to constants, RequestStep change _currentStep.Status to Done #55

* Cleanup tree, and display selected item from tree in renderable content control

* Remove unnecessary code

* asp

* Implemention of UI dispatcher for calls arising from different threads.
Implementation of ICommand (CanExecute()) in TcoCore.TcoTask

* - fixing documentation comment

* synch with dev

* docu sequencer

* TcoSequencer  Invalid mode tests

* asp

* WIP

* asp

* #53 Use enum instead of boolean for sequencer constructor.

* An attempt to removed LineIds

* Removed line ids

* Leftover lineids

* Changed the summary for the enum

* asp

* WIP

* Make the startup sequence more user friendly

* Added sequencer view

* wip

* simple sequence wip

* TcoContext OnEntry OnExit tests added

* Solved isssue when on calling Restore() method inside OnStateChange() causes pagefault #29

* Initial implementation of ITcoServiceable in TcoComponent. Allows to tell tasks of the component that in service mode active and tasks can be invoked remotely (HMI/SCADA)

* Color examples 101 and Connecting sequences 201

* 301 - Invoking tasks to run sequences.

* #66 Implementation of public member TcoSequencer.CurrentStep

* #66 api documentation comments

* asp

* Update README.md

* Update README.md

* Task execution 302

* TcoCore.TcoComponent ServiceMode implementation added + unit tests #65

* Hiding _restoringSequence ~variable

* wip

* CurrentStep in not REFERENCE TO StepDetails
#24

* Added code from webinar
replaced textblocks with markdown

* Adds auto-renderable TcoObjectDiagnosticsView TcoObjectDiagnosticsViewModel will render on 'PresentationType' = 'Diagnostics'
https://github.com/Inxton/TcOpen/issues/70

* Adds auto-renderable TcoContextDiagnosticsView TcoContextDiagnosticsViewModel will render on 'PresentationType' = 'Diagnostics'
https://github.com/Inxton/TcOpen/issues/70

* diagnostics view usage

* ++Adds auto-renderable TcoContextDiagnosticsView TcoContextDiagnosticsViewModel will render on 'PresentationType' = 'Diagnostics'
https://github.com/Inxton/TcOpen/issues/70

* Get diagnostics from context

* Autoupdate messages hotfix

* remove MD

* Update README.md

* Update README.md

* Update README.md

* TcoTaskView, TcoObjectView -> TcoObjectControlView

* package update inxton 1.10.0-nightly.436

* added package material design package

* removed mahapp dependencies added noticies for new added depencencies

* Update README.md

* removed ivc script - replaced with modified behaviour of IVC CLI

* minor to TaskView

* + library tempate + script

* Added RelayCommand
Task can be aborted from GUI

* Swallow an exception in the VisibleTaskStateConverter

* library template + script

* Update scaffoldnewlibrary.ps1

fixed a stupid logic mistake I made

* Tests runners move to TcoCore + refactoring
Arrange in .net - execute on plc task - assert in .net

* library tempate script fix (not break but continue you silly boy)

* basic scaffolding of TcoElements... digital sensor

* Scaffolding TcoDrivesBeckhoff
+ build scripts updates

* DI monitoring propreties attributes

* Refactor fbCylinder to Cylinder

* #40 Add cylinder info messages.

* remove beckhof drive testing (missing hw)

* solving merge issues - drive does not build in pipeline

* version bump

* #40 redesigned cylinder view
fixed typo cyclinder  :)

* fixed an issue with duplicate assembly info and missing namespace imports for assembly attributes

* #39 Simple digital signal UI

* running rabbit

* running rabbit killed while running

* ()()()()() - next time ammend ()()()()()

* + DigitalActuator + DigitalSensor components + tests

* various build fixied

* rebuild the complete solution

* Use material colors

* Fixed regarding material design dependency.

* Naming refactoring: TcoDi and TcoDo instead of TcoDigitalSignal and TcoDigitalActuator

* - build and test fixies

* Update README.md

* Update README.md

* Update README.md

* Components use outside TcOpenFramework/minor fixies to Cylinder component (#54)

* Fixed returns from taks method  (ITcoTask to ITcoTaskStatus)

* Non framework context block for compnents use outside TcOpen framework.
Fixed fbPiston in test examples.

* fixed layout of piston component

* Additions to Non framework use of components

* Workaround an issue when at startup the connector may deadlock if batched operations are started prior to R/W loop operations are propertly initiated. Reported to Inxton core team as FOXTROTH #564

* fixed some typos

* Added tasks to TcoDi/TcoDo for serviceablity,
Update/refactor WPF UI components

* line IDs removal from some blocks

* exising line ids removed from everywhere I could find it

Co-authored-by: PTKu <me@me.me>

* Stringbuilder using fleunt interface (#51)

* #37 Implementation of StringBuilder

* Unit tests for stringbuilder

Co-authored-by: Jozef Chmelar ml <jozef.chmelar.ml@mts.sk>
Co-authored-by: Peter <61538034+PTKu@users.noreply.github.com>

* Update README.md

Removed build badge Azure will be replaced by gh actions

* Test to setup Github Actions (#63)

* Create main.yml

* Update main.yml

* Update main.yml

Just a dummy edit, because I can't trigger the actions manually

* Update main.yml

* Use community version of msbuild

Co-authored-by: Jozef Chmelar <jozef.chmelar.ml@mts.sk>

* Copy files in separate step. (#64)

* Copy files in separate step.

* Consolidate strings
Display executing command by defualt

Co-authored-by: Jozef Chmelar <jozef.chmelar.ml@mts.sk>

Co-authored-by: PTKu <p@nowhere.com>
Co-authored-by: Tomas Kovac <tomas.kovac@mts.sk>
Co-authored-by: Jozef Chmelar <jozef.chmelar.ml@mts.sk>
Co-authored-by: MTS\peto.kurhajec <me@me.me>
Co-authored-by: TomKovac <61820360+TomKovac@users.noreply.github.com>
Co-authored-by: Jokinko <jozefchmelar@users.noreply.github.com>
Co-authored-by: Gerhard Barteling <33071638+Barteling@users.noreply.github.com>
@HAHermsen
Copy link

HAHermsen commented May 13, 2021

moved to #75

@PTKu
Copy link
Member Author

PTKu commented May 13, 2021

@HAHermsen is this a comment to #75 ?

@HAHermsen
Copy link

HAHermsen commented May 17, 2021

Some ideas based on popular DCS design paradigm's approach which is used in the both 800xA and PCS-7. the paradigm is actually very smart and allows for a sophisticated and fine grained control scheme for the Control Module. To be honest I could write a massive document on it but we better start out small so here are is my preliminary idea

The innermost FB which uses OOP approach

  • The innermost FB will expose a minimum of traditional parameters as to keep the instanciation quick and clean.
  • Setup of the FB instance can be done via the Config struct or via the the config method which accepts a config struct.
  • My suggestion would be to avoid using FB_Init as this will make the FB slightly more rigid as that usage is mandatory with declaration, while the actual setup can be done via a parameter struct or method which allows for more flexibility in the code.

Wrapper FB (uses classical approach mostly)

  • The wrapper should encapsulate the inner most FB by composition to allow for a maximum of continued use for the end user as he she can still use inheritance or composition
  • The traditionally connected structs as parameters will be connected to the methods of the encapsulated FB
  • A struct for controlling the FB via Automatic code (called auto in DCS world),
  • A struct for colntrolling the FB via HMI (called manual/hand in DCS world),
  • A set of signals in the object Status which tell that the FB is in Auto or Hand, Locally Controlled or even in Tag Out mode
  • The Local / Remote control switch is connected via the IO struct which is IN/OUT at once so both in and out signals are declared.Some examples of IO signals in the

IO.iFbOn, // pretty self explanatory, Feedback open reached
IO.iFbCls, // pretty self explanatory, Feedback close reached
IO.oCmdOpen, // pretty self explanatory, command open, could be pulsed or continuous depending on a config setting, usually continous until a feedback is reached
IO.oCmdClose, // pretty self explanatory, command close, could be pulsed or continuous depending on a config setting, usually continous until a feedback is reached
IO.iRemoteControl // If Enabled the device is controlled via either hand /auto signals of the FB, if it is false, the operator contols the device locally (in the field)
IO.TagOut // The device is DISABLED and POWERED DOWN for use, it has been tagged out by Lock Out, Tag Out procedure. The control system may NEVER send IO signals to the device, als incomming IO signals should/will be ignored

  • The Remote/Local control switch tells the FB if it simply needs to follow the field (Local control) or can send commands to the field (via AUTO / HAND)
    Status.eCtrlMode // Enumeration current Hand, Auto, Local or TagOut status

@PTKu you may move this post at your discretion to a discussion

@PTKu
Copy link
Member Author

PTKu commented May 17, 2021

@HAHermsen sounds good to me... let's first close the topic around component structure #75
Then we will need to see where do we place wrapper blocks, as I am thinking about it would be better to have them in a separate project(s).

I am converting this to discussion

@PTKu PTKu closed this as completed May 17, 2021
@TcOpenGroup TcOpenGroup locked and limited conversation to collaborators May 17, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants