Initial commit

This commit is contained in:
2026-07-03 16:31:37 +07:00
commit 899c7c637d
1939 changed files with 641750 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using RobotNet.VDA5050;
using RobotNet.VDA5050.Factsheet;
using RobotNet.VDA5050.Type;
using RobotNet10.RobotApp.Interfaces;
using RobotNet10.RobotApp.Services.ConfigManager;
using RobotNet10.RobotApp.Services.Robot.Connection;
namespace RobotNet10.RobotApp.Services.Robot;
public class RobotFactsheet(IConnectionConfig ConnectionConfig,
IRobotConnectionsService RobotConnection,
Logger<RobotFactsheet> Logger) : IFactsheet
{
public async Task PubFactsheet()
{
try
{
if (!RobotConnection.IsConnected) return;
var vdaConfig = ConnectionConfig.GetVDA5050Config();
FactSheetMsg factSheet = new()
{
SerialNumber = vdaConfig.SerialNumber,
Manufacturer = vdaConfig.Manufacturer,
Version = vdaConfig.Version,
};
await RobotConnection.PublishFactsheetAsync(factSheet);
}
catch (Exception ex)
{
Logger.Error($"Error publishing factsheet: {ex.Message}");
}
}
}