C# Class GuruxDLMSServerExample.GXDLMSBase

All example servers are using same objects.
Inheritance: Gurux.DLMS.Secure.GXDLMSSecureServer
Show file Open project: Gurux/Gurux.DLMS.Net Class Usage Examples

Public Methods

Method Description
GXDLMSBase ( bool logicalNameReferencing, InterfaceType type ) : System
Initialize ( int port ) : void

Generic initialize for all servers.

Initialize ( string port ) : void
Update ( UpdateType type, ValueEventArgs e ) : void

Protected Methods

Method Description
Action ( ValueEventArgs args ) : void
Connected ( GXDLMSConnectionEventArgs e ) : void
Disconnected ( GXDLMSConnectionEventArgs e ) : void
FindObject ( ObjectType objectType, int sn, string ln ) : GXDLMSObject

All objects are static in our example.

InvalidConnection ( GXDLMSConnectionEventArgs e ) : void
IsTarget ( int serverAddress, int clientAddress ) : bool

Our example server accept all connections.

Read ( ValueEventArgs args ) : void

Generic read handle for all servers.

ValidateAuthentication ( Authentication authentication, byte password ) : SourceDiagnostic

Our example server accept all authentications.

Write ( ValueEventArgs args ) : void

Private Methods

Method Description
Init ( ) : void
OnClientConnected ( object sender, Gurux e ) : void

Client has made connection.

OnClientDisconnected ( object sender, Gurux e ) : void

Client has close connection.

OnError ( object sender, Exception ex ) : void
OnReceived ( object sender, Gurux e ) : void

Client has send data.

SendPush ( GXDLMSPushSetup target ) : void

Method Details

Action() protected method

protected Action ( ValueEventArgs args ) : void
args Gurux.DLMS.ValueEventArgs
return void

Connected() protected method

protected Connected ( GXDLMSConnectionEventArgs e ) : void
e Gurux.DLMS.GXDLMSConnectionEventArgs
return void

Disconnected() protected method

protected Disconnected ( GXDLMSConnectionEventArgs e ) : void
e Gurux.DLMS.GXDLMSConnectionEventArgs
return void

FindObject() protected method

All objects are static in our example.
protected FindObject ( ObjectType objectType, int sn, string ln ) : GXDLMSObject
objectType ObjectType
sn int
ln string
return Gurux.DLMS.Objects.GXDLMSObject

GXDLMSBase() public method

public GXDLMSBase ( bool logicalNameReferencing, InterfaceType type ) : System
logicalNameReferencing bool
type InterfaceType
return System

Initialize() public method

Generic initialize for all servers.
public Initialize ( int port ) : void
port int
return void

Initialize() public method

public Initialize ( string port ) : void
port string
return void

InvalidConnection() protected method

protected InvalidConnection ( GXDLMSConnectionEventArgs e ) : void
e Gurux.DLMS.GXDLMSConnectionEventArgs
return void

IsTarget() protected method

Our example server accept all connections.
protected IsTarget ( int serverAddress, int clientAddress ) : bool
serverAddress int
clientAddress int
return bool

Read() protected method

Generic read handle for all servers.
protected Read ( ValueEventArgs args ) : void
args Gurux.DLMS.ValueEventArgs
return void

Update() public method

public Update ( UpdateType type, ValueEventArgs e ) : void
type UpdateType
e Gurux.DLMS.ValueEventArgs
return void

ValidateAuthentication() protected method

Our example server accept all authentications.
protected ValidateAuthentication ( Authentication authentication, byte password ) : SourceDiagnostic
authentication Authentication
password byte
return SourceDiagnostic

Write() protected method

protected Write ( ValueEventArgs args ) : void
args Gurux.DLMS.ValueEventArgs
return void