lib60870 | Official repository for lib60870 an implementation
kandi X-RAY | lib60870 Summary
kandi X-RAY | lib60870 Summary
lib60870 library for IEC 60870-5 based protocols in C. The current implementation contains code for the IEC 60870-5-101 (application layer and serial link layer) and IEC 60870-5-104 (protocool over TCP/IP) specifications. Please also consider the User Guide and the API reference documentation (
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lib60870
lib60870 Key Features
lib60870 Examples and Code Snippets
Community Discussions
Trending Discussions on lib60870
QUESTION
There is a problem that I’ve been driving with for more than 3 weeks. Please help with advice. I beg you very much! I am new to C ++. Even small tips can help me!
It is required to create a server that must store the integer values of various signals. A client can connect to this server and receive this data.
Data transmission between the client and server occurs according to the industrial protocol IEC-60870-5-104 TCP / IP.
I used a ready-made library that implements this IEC-104 protocol in C and created a C ++ program. (GIT link)
I wrote a test program (main.cpp). A list of signals with values (for example, 450 elements) arrives at the input, then this list is transferred to the Map dictionary. The program compiles and runs on Linux Debian from the command line (gcc version 9.2.1 20191109 (Debian 9.2.1-19) ). There is no debugger here.
Then, in an infinite loop, the functions of changing the quality label and signal value on the server are called one by one. The implementation of the functions is almost the same. The difference is that SetBadQuality works for several values at once, and ChangeValue works for one specific signal.
Modified signals (it does not matter if the quality label or value has changed) are added to the queue (CS104_Slave_enqueueASDU), after which the client receives data from this queue. The library says that when the queue is full, they begin to overwrite the older values in this queue. And as soon as the client receives data from the queue, they are deleted in the queue. To send data to the client, ASDU (Application Service Data Unit) packets in the TSP / IP are used.
At first, the program works correctly. The client successfully accepts the changed signal values. Their quality is changing, their values are changing. Everything works well.
But a certain point in time flies segFault. The error crashes only when the client is connected to the server. If the client is not connected to the server, then the program works correctly without errors (but seg fault appears immediately after the client connects to the server).
Used the valgrind utility to generate log messages.
In fact, no in-depth study of this library is required. Can someone tell me what my error is specifically in C ++? Why does a seg fault crash?
If I change the number of elements in a List (for example, from 450 elements to 500), the error appears at another point in time.
IEC104Server.h ...ANSWER
Answered 2020-Apr-09 at 06:05You need to go through the errors one by one and fix them. Take the first error
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lib60870
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page