This guide shows you how to use Gurux DLMS/COSEM component in the Visual Studio .NET environment
using the C# language.
Adding DLMS/COSEM component to the project
- Start Visual Studio .NET
- Open the project where you want to add the DLMS/COSEM component, or create a new one
Using components with .NET
Creating component dynamically
To create component in runtime, select Add Reference in the Project menu.
The dialog shows available components, select the one(s) to use (in this case Gurux DLMS component).
Click OK to finish. The following example shows how to create a Gurux DLMS/COSEM component.
using Gurux.GuruxDLMS; //Create new component CGXCOSEM cosem1 = new CGXCOSEMClass();
Setting Properties
//Initialize DLMS/COSEM settings. //Set client and server IDs. Server and client identifier values depend from manufacturer. cosem1.ClientID = (Byte) 3; cosem1.ServerID = (Byte) 24; cosem1.IntefaceType = InterfaceType.General;
Using the components from development environment
Using from .NET | Using from Visual Basic | Using from C++