Exemple #1
0
 ///<summary>
 ///Constructor.
 ///</summary>
 internal GXDLMSSettings(bool server, InterfaceType interfaceType)
 {
     InterfaceType      = interfaceType;
     UseCustomChallenge = false;
     StartingBlockIndex = BlockIndex = 1;
     DLMSVersion        = 6;
     InvokeID           = 0x1;
     Priority           = Priority.High;
     ServiceClass       = ServiceClass.Confirmed;
     MaxServerPDUSize   = MaxPduSize = DefaultMaxReceivePduSize;
     IsServer           = server;
     Objects            = new GXDLMSObjectCollection();
     //This is removed later.
     Hdlc                = new GXDLMSLimits(this);
     Gateway             = null;
     ProposedConformance = GXDLMSClient.GetInitialConformance(false);
     if (server)
     {
         ProposedConformance |= Conformance.GeneralProtection;
     }
     ResetFrameSequence();
     WindowSize = 1;
     UserId     = -1;
     Standard   = Standard.DLMS;
     Plc        = new GXPlcSettings(this);
     MBus       = new GXMBusSettings();
     Pdu        = new GXPduSettings();
 }
Exemple #2
0
 ///<summary>
 ///Constructor.
 ///</summary>
 internal GXDLMSSettings(bool server)
 {
     UseCustomChallenge  = false;
     StartingBlockIndex  = BlockIndex = 1;
     DLMSVersion         = 6;
     InvokeID            = 0x1;
     Priority            = Priority.High;
     ServiceClass        = ServiceClass.Confirmed;
     MaxServerPDUSize    = MaxPduSize = DefaultMaxReceivePduSize;
     IsServer            = server;
     Objects             = new GXDLMSObjectCollection();
     Limits              = new GXDLMSLimits();
     ProposedConformance = GXDLMSClient.GetInitialConformance(false);
     ResetFrameSequence();
 }
Exemple #3
0
 ///<summary>
 ///Constructor.
 ///</summary>
 internal GXDLMSSettings(bool isServer)
 {
     UseCustomChallenge = false;
     StartingBlockIndex = BlockIndex = 1;
     DLMSVersion        = 6;
     InvokeID           = 0x1;
     Priority           = Priority.High;
     ServiceClass       = ServiceClass.UnConfirmed;
     MaxReceivePDUSize  = DefaultMaxReceivePduSize;
     Server             = isServer;
     Objects            = new GXDLMSObjectCollection();
     Limits             = new GXDLMSLimits();
     if (isServer)
     {
         LnSettings = new GXDLMSLNSettings(new byte[] { 0x00, 0x7C, 0x1F });
     }
     else
     {
         LnSettings = new GXDLMSLNSettings(new byte[] { 0x00, 0x7E, 0x1F });
     }
     SnSettings = new GXDLMSSNSettings(new byte[] { 0x1C, 0x03, 0x20 });
     ResetFrameSequence();
 }
Exemple #4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public GXDLMS(bool server)
 {
     Priority = Priority.High;
     InvokeID = 1;
     Ciphering = new GXCiphering(ASCIIEncoding.ASCII.GetBytes("ABCDEFGH"));
     Server = server;
     UseCache = true;
     this.InterfaceType = InterfaceType.General;
     DLMSVersion = 6;
     this.MaxReceivePDUSize = 0xFFFF;
     ClearProgress();
     GenerateFrame = true;
     Limits = new GXDLMSLimits();
     GetObjectTypes();
 }
 ///<summary>
 ///Constructor.
 ///</summary>
 internal GXDLMSSettings(bool server)
 {
     UseCustomChallenge = false;
     StartingBlockIndex = BlockIndex = 1;
     DLMSVersion = 6;
     InvokeID = 0x1;
     Priority = Priority.High;
     ServiceClass = ServiceClass.Confirmed;
     MaxServerPDUSize = MaxPduSize = DefaultMaxReceivePduSize;
     IsServer = server;
     Objects = new GXDLMSObjectCollection();
     Limits = new GXDLMSLimits();
     LnSettings = new GXDLMSLNSettings(new byte[] { 0x00, 0xFE, 0x1F });
     SnSettings = new GXDLMSSNSettings(new byte[] { 0x1C, 0x03, 0x20 });
     ResetFrameSequence();
 }