C# 클래스 Gurux.DLMS.GXDLMSServer

GXDLMSServer implements methods to implement DLMS/COSEM meter/proxy.
파일 보기 프로젝트 열기: Gurux/Gurux.DLMS.Net 1 사용 예제들

Private Properties

프로퍼티 타입 설명
GenerateConfirmedServiceError byte[]
GenerateDisconnectRequest void
HandleAarqRequest void
HandleCommand byte[]
HandleSnrmRequest void
NotifyAction void
NotifyFindObject Gurux.DLMS.Objects.GXDLMSObject
NotifyInvalidConnection void
NotifyRead void
NotifyWrite void
ReportError byte[]

공개 메소드들

메소드 설명
GXDLMSServer ( ) : System

Constructor.

GXDLMSServer ( bool logicalNameReferencing, InterfaceType type ) : System

Constructor.

HandleRequest ( byte buff ) : byte[]

Handles client request.

HandleRequest ( byte buff, GXDLMSConnectionEventArgs connectionInfo ) : byte[]

Handles client request.

Initialize ( ) : void

Initialize server.

This must call after server objects are set.

Reset ( ) : void

Reset after connection is closed.

Reset ( bool connected ) : void

Reset settings when connection is made or close.

Update ( UpdateType type, ValueEventArgs e ) : void

Get selected value.

보호된 메소드들

메소드 설명
Action ( ValueEventArgs args ) : void

Action is occurred.

Connected ( GXDLMSConnectionEventArgs connectionInfo ) : void

Accepted connection is made for the server.

All initialization is done here. Example access level of the COSEM objects is good to update here.

Disconnected ( GXDLMSConnectionEventArgs connectionInfo ) : void

Server has close the connection. All clean up is made here.

FindObject ( ObjectType objectType, int sn, String ln ) : GXDLMSObject

Find object.

InvalidConnection ( GXDLMSConnectionEventArgs connectionInfo ) : void

Client has try to made invalid connection. Password is incorrect.

IsTarget ( int serverAddress, int clientAddress ) : bool

Check is data sent to this server.

Read ( ValueEventArgs args ) : void

Read selected item.

ValidateAuthentication ( Authentication authentication, byte password ) : SourceDiagnostic

Check whether the authentication and password are correct.

Write ( ValueEventArgs args ) : void

Write selected item.

비공개 메소드들

메소드 설명
GenerateConfirmedServiceError ( ConfirmedServiceError service, ServiceError type, byte code ) : byte[]

Generate confirmed service error.

GenerateDisconnectRequest ( ) : void

Generates disconnect request.

HandleAarqRequest ( GXByteBuffer data, GXDLMSConnectionEventArgs connectionInfo ) : void

Parse AARQ request that client send and returns AARE request.

HandleCommand ( Command cmd, GXByteBuffer data, GXDLMSConnectionEventArgs connectionInfo ) : byte[]

Handle received command.

HandleSnrmRequest ( ) : void

Parse SNRM Request. If server do not accept client empty byte array is returned.

NotifyAction ( ValueEventArgs args ) : void

Action is occurred.

NotifyFindObject ( ObjectType objectType, int sn, String ln ) : GXDLMSObject

Find object.

NotifyInvalidConnection ( GXDLMSConnectionEventArgs connectionInfo ) : void

Client has try to made invalid connection. Password is incorrect.

NotifyRead ( ValueEventArgs args ) : void

Read selected item.

NotifyWrite ( ValueEventArgs args ) : void

Write selected item.

ReportError ( Command cmd, ErrorCode error ) : byte[]

메소드 상세

Action() 보호된 추상적인 메소드

Action is occurred.
protected abstract Action ( ValueEventArgs args ) : void
args ValueEventArgs Handled action requests.
리턴 void

Connected() 보호된 추상적인 메소드

Accepted connection is made for the server.
All initialization is done here. Example access level of the COSEM objects is good to update here.
protected abstract Connected ( GXDLMSConnectionEventArgs connectionInfo ) : void
connectionInfo GXDLMSConnectionEventArgs Connection information.
리턴 void

Disconnected() 보호된 추상적인 메소드

Server has close the connection. All clean up is made here.
protected abstract Disconnected ( GXDLMSConnectionEventArgs connectionInfo ) : void
connectionInfo GXDLMSConnectionEventArgs Connection information.
리턴 void

FindObject() 보호된 추상적인 메소드

Find object.
protected abstract FindObject ( ObjectType objectType, int sn, String ln ) : GXDLMSObject
objectType ObjectType Object type. In Short Name referencing this is not used.
sn int Short Name. In Logical name referencing this is not used.
ln String Logical Name. In Short Name referencing this is not used.
리턴 Gurux.DLMS.Objects.GXDLMSObject

GXDLMSServer() 공개 메소드

Constructor.
public GXDLMSServer ( ) : System
리턴 System

GXDLMSServer() 공개 메소드

Constructor.
public GXDLMSServer ( bool logicalNameReferencing, InterfaceType type ) : System
logicalNameReferencing bool
type InterfaceType
리턴 System

HandleRequest() 공개 메소드

Handles client request.
public HandleRequest ( byte buff ) : byte[]
buff byte /// Received data from the client.
리턴 byte[]

HandleRequest() 공개 메소드

Handles client request.
public HandleRequest ( byte buff, GXDLMSConnectionEventArgs connectionInfo ) : byte[]
buff byte /// Received data from the client.
connectionInfo GXDLMSConnectionEventArgs
리턴 byte[]

Initialize() 공개 메소드

Initialize server.
This must call after server objects are set.
public Initialize ( ) : void
리턴 void

InvalidConnection() 보호된 추상적인 메소드

Client has try to made invalid connection. Password is incorrect.
protected abstract InvalidConnection ( GXDLMSConnectionEventArgs connectionInfo ) : void
connectionInfo GXDLMSConnectionEventArgs Connection information.
리턴 void

IsTarget() 보호된 추상적인 메소드

Check is data sent to this server.
protected abstract IsTarget ( int serverAddress, int clientAddress ) : bool
serverAddress int Server address.
clientAddress int Client address.
리턴 bool

Read() 보호된 추상적인 메소드

Read selected item.
protected abstract Read ( ValueEventArgs args ) : void
args ValueEventArgs Handled read requests.
리턴 void

Reset() 공개 메소드

Reset after connection is closed.
public Reset ( ) : void
리턴 void

Reset() 공개 메소드

Reset settings when connection is made or close.
public Reset ( bool connected ) : void
connected bool
리턴 void

Update() 공개 추상적인 메소드

Get selected value.
public abstract Update ( UpdateType type, ValueEventArgs e ) : void
type UpdateType
e ValueEventArgs Handle get request.
리턴 void

ValidateAuthentication() 보호된 추상적인 메소드

Check whether the authentication and password are correct.
protected abstract ValidateAuthentication ( Authentication authentication, byte password ) : SourceDiagnostic
authentication Authentication Authentication level.
password byte Password
리턴 SourceDiagnostic

Write() 보호된 추상적인 메소드

Write selected item.
protected abstract Write ( ValueEventArgs args ) : void
args ValueEventArgs Handled write requests.
리턴 void