CODESYS Base Libraries
General Description
The CODESYS Base Libraries package contains a collection of libraries which simplify the development of other libraries and applications. These libraries have been installed directly in CODESYS Development System versions <= 3.5.20.0.
Tip
See the description of some sample projects using these base libraries:
The following libraries are supplied with the package:
Asynchronous Job Manager: The library contains function blocks for optimized processing of asynchronous tasks.
Common Behaviour Model: The library contains an object-oriented implementation of the Common Behaviour Model.
Element Collections: The library contains function blocks and interfaces for saving object references in predefined data structures, such as lists, queues, stacks, and hash tables ("collections").
Memory Block Manager: The library contains functions for handling pools, queues, and messages.
Net Base Services: The library implements a TCP server, a TCP client, and a UDP peer as a collection of basic services for Ethernet.
Segmented Buffer Manager: The library contains functions for handling different segments of a large buffer, the merging of segments, or the splitting of buffers into segments. This is done without the contents being constantly copied. The functions try to reference the segments instead of copying them, and manage the segments in double-linked lists.
SharedData Utilities for MultiCore: The library contains data structures and functions for ensuring data consistency in a multicore environment.
Detecting and correcting errors
Net Base Services
The interruption of an existing connection between the server and client (for example by unplugging the Ethernet cable) is not detected by the controller. In the case of TCP/IP, the disconnection of a cable can be detected only if the client or server detects that an expected telegram is missing for a certain time (timeout).
The protocol must therefore be designed in such a way that telegrams are regularly exchanged between the client and the server. When a timeout occurs, both sides can close the connection independently of each other. The connection can then be used again to establish a new connection.