소스 정보
- 저장소
- JohnNuwan/EVA_CORE
- 최근 소스 활동
- 2026년 7월 18일 08:30
- 감지된 SKILL.md 언어
- 프랑스어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/JohnNuwan/EVA_CORE --skill csharp-dotnet-industrial명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Concevoir et maintenir un watchdog auto-correcteur pour services HTTP — checks de santé, auto-restart, état persistant, rapports et pièges bash.
Serveur de messagerie sécurisé auto-hébergé (Signal-like) avec Flask + WebSocket + AES-256-GCM + pont EVA
ADAM-SENTINEL — Veilleur technologique 24h/24h. Scanne 10 domaines, cree des rapports, met a jour les skills, alerte sur les CVE et breaking changes.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | csharp-dotnet-industrial |
| description | Développer en C# pour l'intégration MES et les HMIs Windows. |
| version | 1.1.0 |
| author | EVA |
| license | Privée EVA St-Étienne |
| platforms | ["windows","linux"] |
| metadata | {"tags":["csharp","dotnet","opc-ua","ads","mes","snap7","plctag","wpf","mvvm","database","industrial-integration"],"related_skills":["sql-for-industrial-systems","ot-it-integration-languages","scada-hmi-programming-languages"]} |
Cette compétence encadre l'utilisation de C# et du framework .NET pour concevoir des applications de supervision (HMI), connecter des équipements industriels aux systèmes MES/ERP (OT-IT), et manipuler des protocoles de communication natifs.
En production, un client OPC UA ne doit jamais perdre sa connexion de manière définitive. Le code ci-dessous utilise le SDK officiel OPCFoundation.NetStandard.Opc.Ua et implémente un gestionnaire robuste.
using System;
using System.Threading;
using System.Threading.Tasks;
using Opc.Ua;
using Opc.Ua.Client;
using Opc.Ua.Configuration;
public class EVAOpcClient
{
private Session _session;
private readonly string _endpointUrl;
private readonly ApplicationConfiguration _config;
public EVAOpcClient(string endpointUrl)
{
_endpointUrl = endpointUrl;
_config = CreateOpcConfiguration();
}
private ApplicationConfiguration CreateOpcConfiguration()
{
var config = new ApplicationConfiguration()
{
ApplicationName = "EVA.OpcClient",
ApplicationType = ApplicationType.Client,
ApplicationConfiguration = new ClientConfiguration { DefaultSessionTimeout = 60000 },
SecurityConfiguration = new SecurityConfiguration
{
AutoAcceptUntrustedCertificates = true,
RejectSHA1SignedCertificates = false
},
TransportQuotas = new TransportQuotas { OperationTimeout = 15000 }
};
config.Validate(ApplicationType.Client).GetAwaiter().GetResult();
return config;
}
public async Task ConnectAsync(CancellationToken ct)
{
var endpoint = new ConfiguredEndpoint(,
CoreClientUtils.SelectEndpoint(_endpointUrl, useSecurity: ),
EndpointConfiguration.Create(_config));
(!ct.IsCancellationRequested)
{
{
Console.WriteLine();
_session = Session.Create(_config, endpoint, , , , , );
_session.KeepAlive += OnSessionKeepAlive;
Console.WriteLine();
;
}
(Exception ex)
{
Console.WriteLine();
Task.Delay(, ct);
}
}
}
{
(e.Status != KeepAliveStatus.Good)
{
Console.WriteLine();
Task.Run(() => ConnectAsync(CancellationToken.None));
}
}
{
(_session == || !_session.Connected)
InvalidOperationException();
nodeId = NodeId(nodeIdStr);
nodesToRead = ReadValueIdCollection {
ReadValueId { NodeId = nodeId, AttributeId = Attributes.Value }
};
response = _session.ReadAsync(, , TimestampsToReturn.Both, nodesToRead, CancellationToken.None);
response.Results[];
}
}
Pour éviter de poller le PLC en permanence, on utilise l'enregistrement de notifications d'ADS (TwinCAT.Ads).
using System;
using TwinCAT.Ads;
public class TwinCatManager : IDisposable
{
private AdsClient _client;
private uint _notificationHandle;
public void Initialize(string netId, int port)
{
_client = new AdsClient();
_client.Connect(netId, port);
// Enregistrement d'une notification sur changement de variable PLC
// Cycle de vérification de 100ms, transmission immédiate sur changement de valeur
_notificationHandle = _client.AddDeviceNotification(
"GVL.TemperatureFour",
new TypeMarshaler(typeof(float)),
new NotificationSettings(AdsTransMode.OnChange, 100, 0),
null
);
_client.AdsNotification += OnAdsNotificationReceived;
}
private void OnAdsNotificationReceived(object sender, AdsNotificationEventArgs e)
{
if (e.UserData is float temp)
{
Console.WriteLine($"[ALERT] Changement de température reçu : {temp} °C");
}
}
public void Dispose()
{
if (_client != null)
{
if (_notificationHandle != )
_client.DeleteDeviceNotification(_notificationHandle);
_client.Disconnect();
_client.Dispose();
}
}
}
En atelier de fabrication, les HMIs WPF doivent être hautement réactives. Le modèle ViewModel ci-dessous met à jour l'interface de manière asynchrone sans bloquer le thread principal.
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
public class MainViewModel : INotifyPropertyChanged
{
private float _pressionCuve;
private string _statutConnexion = "Déconnecté";
public float PressionCuve
{
get => _pressionCuve;
set
{
_pressionCuve = value;
OnPropertyChanged();
}
}
public string StatutConnexion
{
get => _statutConnexion;
set
{
_statutConnexion = value;
OnPropertyChanged();
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
// Boucle d'acquisition asynchrone lancée au démarrage de la fenêtre
public async Task StartAcquisitionLoopAsync(EVAOpcClient client, CancellationToken ct)
{
StatutConnexion = "En cours de connexion...";
await client.ConnectAsync(ct);
StatutConnexion = "Connecté";
while (!ct.IsCancellationRequested)
{
{
data = client.ReadNodeAsync();
(data.Value pression)
{
PressionCuve = pression;
}
Task.Delay(, ct);
}
{
StatutConnexion = ;
client.ConnectAsync(ct);
}
}
}
}
Dapper est préféré à Entity Framework dans les environnements industriels pour des questions de performances brutes de requêtage SQL.
using System;
using System.Data.SqlClient;
using Dapper;
public class ProductionLogger
{
private readonly string _connectionString;
public ProductionLogger(string connectionString)
{
_connectionString = connectionString;
}
public void LogLotProduction(string lotId, float poidsMesure, string operateur)
{
const string query = @"
INSERT INTO T_Tracabilite_Lots (ID_Lot, Date_Enregistrement, Poids, Operateur, Statut)
VALUES (@LotId, @DateEnreg, @Poids, @Operateur, @Statut);";
using (var connection = new SqlConnection(_connectionString))
{
connection.Open();
connection.Execute(query, new {
LotId = lotId,
DateEnreg = DateTime.Now,
Poids = poidsMesure,
Operateur = operateur,
Statut = poidsMesure >= 10.0f ? "CONFORME" : "REBUT"
});
}
}
}