High-Performance Industrial IoT (IIoT) Monitoring System in C#

High-Performance Industrial IoT (IIoT) Monitoring System in C#

In the era of Industry 4.0, Industrial Internet of Things (IIoT) technology has gradually become the core of the manufacturing industry. By connecting devices to the network, interconnectivity between devices can be achieved, which improves production efficiency, optimizes production processes, and reduces production costs. To efficiently monitor and manage IIoT devices, developing a high-performance monitoring … Read more

Linux Series: How to Use Heaptrack to Trace .NET Program Unmanaged Memory Leaks

Linux Series: How to Use Heaptrack to Trace .NET Program Unmanaged Memory Leaks

1. Background 1. Storytelling Previously, I shared an article about <span>unmanaged memory leaks caused by C# calling C code</span>. This was a deliberately induced positive leak. In this article, we will explore the root cause of the leak from a reverse perspective. This issue is relatively easy to handle on Windows, as many people know … Read more

Creating an IIS Hosted Handler with C# for Special Requests

Creating an IIS Hosted Handler with C# for Special Requests

In this article, we will create an IIS hosted handler using C# to handle some special requests for our website. This hosted handler can perform various functions, such as preventing hotlinking and downloading of audio, video, and image resources on our site, as well as providing special services like webSocket services. We can write a … Read more

C# ‘Hammer of Thor’: Accelerating Game Physics Engine with SIMD Instruction Set

C# 'Hammer of Thor': Accelerating Game Physics Engine with SIMD Instruction Set

Introduction In modern game development, the performance of the game physics engine is crucial for creating a realistic gaming experience. From collision detection to complex rigid body motion simulation, the physics engine needs to handle a large number of mathematical calculations. The traditional Single Instruction Single Data (SISD) processing method gradually reveals performance bottlenecks when … Read more

Flurl: A Powerful HTTP Client Library

Flurl: A Powerful HTTP Client Library

Flurl is a modern URL builder.Building Flurl.Url Implicitly create Flurl.Url objects using string extension methods using Flurl;var url = "https://some-api.com" .AppendPathSegment("endpoint") .SetQueryParams(new { api_key = _config.GetValue<string>("MyApiKey"), max_results = 20, q = "I'll get encoded!" }) .SetFragment("after-hash");// result:// https://some-api.com/endpoint?api_key=xxx&amp;max_results=20&amp;q=I%27ll%20get%20encoded%21#after-hash 2. Create a Url object explicitly; all string extension methods can also be used with System.Uri var … Read more

Implementing Modbus TCP Master Communication in C# (Part II)

Implementing Modbus TCP Master Communication in C# (Part II)

Abstract ❝ This article builds upon the previous one by adding the functionality to read and write int and float data, as well as byte order reading and writing functions (ABCD, BADC, CDAB, DCBA)【Project address at the end of the article】. Introduction Today, we will discuss how to add new features to the previous article … Read more

Open Source Communication Debugging Tool Supporting Modbus and MQTT

Open Source Communication Debugging Tool Supporting Modbus and MQTT

Introduction A communication debugging tool developed based on WPF, featuring a user-friendly interface and easy operation. It supports both Modbus and MQTT protocols, enabling debugging of various communication methods. Whether in industrial automation, smart home, or IoT fields, this tool can meet your needs. Additionally, the code is open source and modular, making it highly … Read more

A Comprehensive Guide to SIMD Acceleration of Numeric Types in C# (2024)

A Comprehensive Guide to SIMD Acceleration of Numeric Types in C# (2024)

In modern application development, performance optimization is a core requirement in many scenarios, especially when dealing with large-scale numerical computations. Single Instruction, Multiple Data (SIMD) technology significantly enhances computational efficiency by processing multiple data points in parallel. This article will delve into the fundamental concepts, core types, usage methods, performance benchmarks, and best practices of … Read more

Implementing Modbus RTU Master Communication in C#

Implementing Modbus RTU Master Communication in C#

Abstract ❝ This article describes how to use C# to call the NModbus4 library and the System.IO.Ports library to implement Modbus RTU communication functionality【Project address at the end of the article】. Introduction Modbus RTU is a serial communication protocol, where the communication mechanism is a polling mechanism where the master device sequentially queries the slave … Read more

Sending HTTP Requests in C#

Sending HTTP Requests in C#

Recently, I researched monitoring group messages on Telegram and planned to extract key information from the received messages to save it to my local database. I utilized the code from the open-source repository https://github.com/Riniba/TelegramMonitor?tab=readme-ov-file, adding HTTP requests to it. First, open the source code. Right-click to open the Manage NuGet Packages and add two packages. … Read more