Skip to content
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

Initial development TcoCore #13

Closed
wants to merge 275 commits into from
Closed

Initial development TcoCore #13

wants to merge 275 commits into from

Conversation

PTKu
Copy link
Member

@PTKu PTKu commented Feb 22, 2021

This is initial work and this PR aims to open discussion; all features here are still under development and undergoing heavy refactoring. Any input from the community is warmly welcomed. Feel free to open a discussion here or in the discussion tab above.

With this PR we move from Inxton organization to this repo and we will continue the development here

Readme changes

https://github.com/Inxton/TcOpen/blob/dev/README.md

Basic framework description

(updated) https://docs.tcopengroup.org/articles/TcOpenFramework/application.html

here is google document to comment on created by @GISED-Link

Please keep the discussion in the following document limited to the content, explanatory issues, etc if you have suggestions regarding design, create and issue or discuss here #21

https://docs.google.com/document/d/1m0K2_1lwMMV4pcp_B2BamQrIaMImWBwfdyzMoOWHfa4/edit

Documentation repository

https://tcopengroup.github.io/TcOpen.Documentation/
||
https://docs.tcopengroup.org/


previous updates:

TcoCore additions

although comitted by me most credit for the work on TcoCore goes to @TomKovac

  • TcoContext - main container for TcOpen application should provide application context
  • TcoTask - coordination primitive that we called it in some place TIP (Task Interface Pattern)
  • TcoState - rudimental state controller that provides components' state auto recovery
  • TcoSequencer - more advanced controller for sequential logic
  • Unit tests

Documentation work is in progress that should help to get an idea about above mentioned stuff

Tc.Prober

we will keep it in this repo at this point to reduce dependency issues

TcoIoBeckhoff

Should contain blocks for access and control of Beckhoff hardware. He we would like to discuss the architecture with the community.

TcoPneumatics

Contains simple block for Pneumatic piston using TcoCore library + some unit tests

Update

There is lot going on in this PR (repository) recently so here we would like to layout some basic concepts of the work that we have done so far.

We are bringing here many concepts that we developed over time and that were successfully used in many of our applications. However there is a danger that we bring a solution that is constrained to the scope and narrow paradigm that corresponds to the application domain specific to our applications. Therefore we would like to have a discussion where other ideas can improve the framework and make it suitable for wider variety of application domains.

We believe that in order to write components in OOP paradigm we need to create a set of basic classes that would allow for effective tasking, coordination, and state control of components as well as applications.

Project structure

Solution and projects are in VS2019. Projects are grouped (see bellow) each group has its own filtered solution 'slnf'. Filtered solution considerably speed up VS operations, this will come handy as TcOpen grows.

There are several TcProject, C#, WPF and testing project in this repository. The projects are grouped into these main chunks:

.\src

  • TcoCore core construction blocks - Here is the main our focus at this point.
  • TcoIoBeckhoff will contain classes for basic Beckhoff hardware
  • TcoPneumatics component for pneumatic, we will be adding TcoDrive, TcoRobotics etc.
  • TcoApplicationExamples examples, usage etc

C# and WPF project are there to help debug and test the libraries, they use inxton framework libraries.
C# project with 'Connector' suffix mediate PLC program for .net environment (WPF, Tests etc).

CI/CD

In ./pipeline folder you can find scripts and configuration for automated build.

Documentation

We are working on 'documentation-as-code' using docfx. It will be in a separate repository here https://github.com/TcOpenGroup/TcOpen.Documentation

TcoCore library

TcContext : ITcoContext

Is an abstract class that should encapsulate a coherent unit (be it technology, station, more complex corelating parts of a device). It implements abstract method Main that is entry point of any logic of that particular unit. In default implementation it contains a counters that provide awareness for the containing objects about the state of execution, optional autonomous state restoration and possibly other features.

TcoObject : ITcoObject

TcoObject is a class from which all other classes of the application should derive. TcoObject implements a series of diagnostics functions, support for messaging and reporting (HMI, alarms, debug etc.). It contains reference to its context as well as the reference of its parent object. It has the ability to query context and parent information.

TcoTask : ITcoTask

TcoTask is the class that is capable of executing tasks in a asynchronous way (similar to Command pattern and Task Asynchronous Pattern). It has the ability to maintain done state and auto-restore/initialize on next invoke call (kind of auto-generated rising edge of the execute function).

TcoComponent : ITcoComponent

TcoComponent base class for any component (drive, cylinder etc.). It is an abstract class that requires implementation of not only core logic, but manual/maintenance mode as well.

TcoState : ITcoState

TcoState is a elementary state controller that provides ability to auto-restore its components.

TcoSequencer : ITcoSequencer

TcoSequencer is an advances state controller with higher observability, step-by-step operations, go-to step functions.

@jozefchmelar
Copy link
Contributor

jozefchmelar commented Feb 24, 2021

There's a lot going on in this PR. but i understand. :)

There's A LOT OF tests...which is great.

I get the idea of Context, Component, Message, Task and State...

eMessageCategory - There's a lot of clutter due to the documentation comment. Enums are self-explanatory.

TcoSelector is disabled, is it work in progress? Does it have to be there?

I would appreciate more practical examples, or a starter project with usage examples - ie. sequencer with pneumatics

To sum it up : It has structure, it makes sense, it has plenty of test, interfaces are clearly defined ...well done

@PTKu
Copy link
Member Author

PTKu commented Feb 24, 2021

@jozefchmelar messaging is unfinished... will need to work on it... that another concept that I would like to discuss later (https://github.com/Inxton/TcOpen/issues/12)
@TomKovac is working on on documentation and will provide some explanatory examples in short time

jozefchmelar
jozefchmelar previously approved these changes Feb 24, 2021
@PTKu PTKu marked this pull request as draft March 1, 2021 10:38
@PTKu PTKu requested a review from jozefchmelar March 2, 2021 16:11
Tomas Kovac and others added 25 commits May 5, 2021 17:22
Fixed regarding material design dependency.
TcoElements refactoring TcoDi and TcoDo, build-tests fixies
PTKu and others added 2 commits May 9, 2021 07:48
Synch PR TcOpenGroup/initial-dev
* 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>

Co-authored-by: Gerhard Barteling <33071638+Barteling@users.noreply.github.com>
Co-authored-by: PTKu <me@me.me>
Co-authored-by: Jokinko <jozefchmelar@users.noreply.github.com>
Co-authored-by: Jozef Chmelar ml <jozef.chmelar.ml@mts.sk>
@PTKu
Copy link
Member Author

PTKu commented May 19, 2021

Merged by other means #65

@PTKu PTKu closed this May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants