Skip to content

Instantly share code, notes, and snippets.

@MD-V
MD-V / Program.cs
Created July 31, 2019 09:22
OPC UA Client Example
using System;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Opc.Ua;
using Opc.Ua.Client;
using Opc.Ua.Configuration;
namespace OpcUaTestClient
{
@MD-V
MD-V / Program.cs
Created July 31, 2019 09:21
OPC UA Server Example
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Opc.Ua;
using Opc.Ua.Configuration;
using Opc.Ua.Server;
namespace OpcUaHaTestServer
{
@MD-V
MD-V / Program.cs
Created July 23, 2019 06:15
OPC UA History sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Timers;
using Opc.Ua;
using Opc.Ua.Configuration;
using Opc.Ua.Server;
@MD-V
MD-V / Vietnamese.cpp
Created February 5, 2019 08:57
Fix vietnamese WideCharToMultiByte
// ############################################################################
// Windows C++ Unicode to Multibyte and vice versa routines. Handles BOMS for you.
// By Mark Jacobs and Vadim Berman (c) 2012.
// Uses Borland C++ Builder 5 Compiler. Could be adapted for other compilers fairly easily.
//
// mjwc2mbstr translates unicode to multibyte.
// It reads unicode from "infl" and writes multibyte output to "oufl".
// The Windows code page number is supplied in "cpn".
//
// mjmb2wcstr translates multibyte to unicode UTF-16.