DlmsProtocol Class

A class that manages a communication with DLMS servers (meters, concentrators). It contains methods for reading and managing meters using DLMS statndard.

Definition

Namespace: OddPrg.Protocols.DLMS
Assembly: OddPrg.Protocols.Dlms (in OddPrg.Protocols.Dlms.dll) Version: 2.0.0.13 (2.0.0.13)
C#
public class DlmsProtocol : Protocol
Inheritance
Object    Protocol    DlmsProtocol

Constructors

DlmsProtocol Initializes a new instance of class.

Properties

Com Komunikátor - nezapomenout přiřadit před použitím protokolu
(Inherited from Protocol)
NegotiatedParameters Currently used DLMS parameters that were negotiated during creating the last association. If association was not created this property returns null.
ProtocolListener Listener used to return data from PLC or from UDP. It must be assigned before any communication is executed.
SecuritySettings Returns object that allows to set up DLMS security.

Methods

ActivateImage Activates an image of new firmware in the meter.
CreateAssociation(DlmsApplicationNameContextId, CancellationToken, Boolean) Creates DLMS association according to current data security settings, using specified app context id. If more than one association is creted by this protocol object, all must negotiate the same parameters, all must use the sme referencing and all must be with or without ciphering. Because it is supposed that more than one crated associations will be used for broadcast.
CreateAssociation(DlmsReferencingType, Boolean, CancellationToken, Boolean) Creates DLMS association according to current data security settings.
DispatchPlcEvent Parses data from PLC communication and checks if it contains events.
DispatchTcpEvent Parses data from GPRS communication and checks if it contains events.
DoDlmsComunication Sends data to the communicator, waits for the response and returns the response.
fillAttributeValuesRead Fills attributes returned by Read response in results into obj properties.
InvokeMethod(DlmsObject, DlmsMethodInfo, DlmsActionResponse, CancellationToken, Boolean) Invokes a method of a DLMS object.
InvokeMethod(DlmsObject, SByte, String, DlmsActionResponse, CancellationToken, Boolean) Invokes a method of a DLMS object.
InvokeMethod(DlmsObject, SByte, String, DlmsType, DlmsActionResponse, CancellationToken, Boolean) Invokes a method of a DLMS object.
InvokeMethods Invokes methods of a DLMS object.
KeyAgreement Uses key_agreement(data) method to create new global keys. If some new-key parameter is null, the corresponding key is not update. Otherwise parameter will containg a new key value after successfull call.
ParseIpEvent Parses EventNotificationRequest obtained from TCP/UDP DLMS meter.
ParseIpNotification Parses DataNotificationRequest obtained from TCP/UDP DLMS meter.
ParseNbiotModuleName Parses EventNotificationRequest obtained from NBIoT module and returns the module name.
ReadAllAttributes Reads all attributes of DLMS/COSEM object using attribute 0. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReadAttribute(DlmsObject, DlmsAttributeInfo, DlmsDataParsed, CancellationToken, Boolean) Reads value of one attribute of DLMS/COSEM object with selective access option. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReadAttribute(DlmsObject, SByte, String, DlmsDataParsed, CancellationToken) Reads value of one attribute of DLMS/COSEM object. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReadAttribute(DlmsObject, SByte, String, DlmsSelectiveAccessParams, DlmsDataParsed, CancellationToken) Reads value of one attribute of DLMS/COSEM object. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReadAttributes Reads selected attributes of DLMS/COSEM object with selective access option. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReadDisconnector 
ReadObjectList(DlmsObject, DlmsDataParsed, String, CancellationToken) Reads object list and returns created objects of all known classes. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReadObjectList(DlmsObject, UInt16, DlmsDataParsed, String, CancellationToken) Reads object list and returns created objects of classes with the desired IDs
ReadProfile Reads attribute buffer of generic profile. If communication fails, returned data are partially parsed and filled in obj and exception is then re-thrown.
ReadTime Reads Time attrebute of DlmsClock object. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReadValue Reads Value attribute of a given DLMS/COSEM object of class DlmsData or some of its descendat. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReadValueExtended Reads Value, Staus and CaptureTime attributes of given DlmsExtendedRegister object. DLMS association must be created before this method is called. Association can be created by CreateAssocitation method.
ReleaseApplicationAssociation Releases DLMS Application Association with currently used DLMS parameters that were negotiated during creating an association.
TransferImage Executes the steps described in BB Figure 12 – Image transfer process flow chart.
TransferKeys Updates global keys by calling method key_transfer(data) of object security setup. If some new-key parameter is null or empty, the corresponding key is not updated.
VerifyImage Verifies an uploaded firmware image before it is activated.
WriteAttribute(DlmsObject, DlmsAttributeInfo, DlmsType, CancellationToken, Boolean) Writes one attribute to selected DLMS object.
WriteAttribute(DlmsObject, SByte, DlmsType, CancellationToken, Boolean) Writes one attribute to selected DLMS object. It uses no attribute selective parameters to write.
WriteAttribute(DlmsObject, SByte, DlmsSelectiveAccessParams, DlmsType, CancellationToken, Boolean) Writes one attribute to selected DLMS object.
WriteAttributes Writes the values to the attributes of the object with selective access option The arrays passed as the parameters must have the same length.

Fields

CURRENT_ASSOCIATION_OBIS_CODE OBIS code of the current association
InitialMaxPduSize Initial value of max PDU size used to negotiate DLMS parameters in CreateAssociations.
MANAGEMENT_LOGICAL_DEVICE_SAP_ADDRESS Address reserved for main logical device.
MANAGEMENT_LOGICAL_DEVICE_UPPER_HDLC_ADDRESS Reserved upper HDLC address for Management logical device
OnProtocolStatus Pokud chci zobrazovat stav protokolu, zde priradit proceduru pro zobrazovani.
(Inherited from Protocol)
PUBLIC_CLIENT_SAP_ADDRESS Address reserved for the Public Client
READING_CLIENT_SAP_ADDRESS Address reserved for the Reading Client

See Also