Giter Club home page Giter Club logo

fisothemes / twincat-dynamic-collections Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 4.0 20.52 MB

A TwinCAT library for creating and manipulating dynamic collections of data in TwinCAT. It provides multiple data structures such as ArrayList (a dynamic array), List (a doubly linked list that is optimized for sequential access and mutation), Set, Map, Queue, Stack and more. Examples are in the project.

License: MIT License

beckhoff collections data-structures hashmap hashset iec-st industrial-automation iterative-avl plc queue stack treemap treeset twincat twincat3

twincat-dynamic-collections's People

Contributors

fisothemes avatar sagatowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twincat-dynamic-collections's Issues

Alllocate dynamic memory

If the memory allocation failes, no error is thrown and bSuccess is set to TRUE. There is no feedback for the user that the object was not saved in the collection.
image

FB_Tree_Map.Remove() balancing

Hi @fisothemes
When removing an element from a FB_Tree_Map the map is balanced. I suspect the balancing here is not correct. Because the node is deleted first and then the balancing is done with this deleted node, which memory is not anymore in use.
As you can see in the printscreen, the memory area of the pTemp node which was removed before is now already in use again by other dynamic objects (in my program). This can lead to exceptions.
I'm not sure, but shouldn't balancing be done from the previsous node (pTemp^.pParent) in this case?
Which have to be saved before removing the pTemp.

e.g.
pPrevious := pTmp^.pParent;
THIS^.Remove_Node(pTmp);
THIS^.Balance(pPrevious);

FB_Tree_Map balancing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.