Line module (automated line with special functions)
Posted: Thu Apr 10, 2025 2:03 pm
The line module handles lines. If you need special functionality to execute an operation, you can develop it in the line module.
The server loads the line modules at the start.
There are a few samples in the x4Trace.Server.Modules.csproj.
This project is prepared to build/develop a new Line Module.
You can develop your own module in this project, just please create a new cs file and do not modify an existing module.
Your x4Trace server uses these line modules, and modifying and building them can cause x4Trace to malfunction.
The name of the line module must be unique!
The name is the module's ID in x4Trace. When a module loads, it is identified by this.
The visible name is the name of the module on the GUI.
Open the x4Trace.Server.Modules.csproj or create a new one, and create a new class that inherits from Ix4Trace.Server.Engine.Line.LineDivisionModule (for a completely new module), LineModule (for a module with few features), ProcessDataCollector (for a slightly complex module), and ProcessController (for a complex module).
The ProcessController.cs is a good example of communicating with a driver or handling it.
x4Trace has a line handling service. This service will handle your line module. You have to build your module and copy it to the x4Trace server directory.
This service starts/stops production, connects and disconnects from drivers, and more. If a driver is connected, you get that information in the OnDriverConnected method.
When a process is started, the OnProcessStarted runs.
The server loads the line modules at the start.
There are a few samples in the x4Trace.Server.Modules.csproj.
This project is prepared to build/develop a new Line Module.
You can develop your own module in this project, just please create a new cs file and do not modify an existing module.
Your x4Trace server uses these line modules, and modifying and building them can cause x4Trace to malfunction.
The name of the line module must be unique!
The name is the module's ID in x4Trace. When a module loads, it is identified by this.
The visible name is the name of the module on the GUI.
Open the x4Trace.Server.Modules.csproj or create a new one, and create a new class that inherits from Ix4Trace.Server.Engine.Line.LineDivisionModule (for a completely new module), LineModule (for a module with few features), ProcessDataCollector (for a slightly complex module), and ProcessController (for a complex module).
The ProcessController.cs is a good example of communicating with a driver or handling it.
x4Trace has a line handling service. This service will handle your line module. You have to build your module and copy it to the x4Trace server directory.
This service starts/stops production, connects and disconnects from drivers, and more. If a driver is connected, you get that information in the OnDriverConnected method.
When a process is started, the OnProcessStarted runs.