public DeviceAlgorithm(DeviceManagerDeviceSettings deviceSettings, Protocol protocol, ErrorLogger errorLogger)
        {
            //DeviceManager = deviceManager;
            Protocol = protocol;
            AlgorithmParams aParams;
            aParams.EndianConverter16Bit = protocol.EndianConverter16Bit;
            aParams.EndianConverter32Bit = protocol.EndianConverter32Bit;
            aParams.Protocol = Protocol;
            aParams.AlgorithmList = deviceSettings.DeviceSettings.AlgorithmList;
            aParams.BlockList = deviceSettings.DeviceSettings.BlockList;
            aParams.DeviceName = deviceSettings.Name;
            aParams.ErrorLogger = errorLogger;

            DoInitialise(aParams);
        }
Exemplo n.º 2
0
        public DeviceBlock(DeviceAlgorithm device, BlockSettings blockSettings, Protocol protocol)
        {
            AlarmFound = false;
            ErrorFound = false;

            Device = device;
            //DeviceManager = Device.DeviceManager;

            //DeviceManager = Device.Manager;
            BlockSettings = blockSettings;
            retryCount = BlockSettings.TimeoutRetries;
            Protocol = protocol;
            ProtocolType = Protocol.Type;
            Conversation = Protocol.GetConversation(BlockSettings.Conversation);
            Name = BlockSettings.Name;
            Type = BlockSettings.Type;
            OnDbWriteOnly = BlockSettings.OnDbWriteOnly;
            LoadRegisters();
            int? temp = BlockSettings.Base;
            Base = temp.HasValue ? temp.Value : -1;
        }
 public InverterAlgorithm(DeviceManagerDeviceSettings deviceSettings, Protocol protocol, ErrorLogger errorLogger)
     : base(deviceSettings, protocol, errorLogger)
 {
     EnergyMargin = 0.01;
     HaveErrorRegisters = false;
 }
Exemplo n.º 4
0
 public DeviceBlock_RequestResponse(DeviceAlgorithm device, BlockSettings blockSettings, Protocol protocol)
     : base(device, blockSettings, protocol)
 {
 }
Exemplo n.º 5
0
 public DeviceBlock_Phoenixtec(DeviceAlgorithm device, BlockSettings blockSettings, Protocol protocol)
     : base(device, blockSettings, protocol)
 {
 }
Exemplo n.º 6
0
 public DeviceBlock_NonModbus(DeviceAlgorithm device, BlockSettings blockSettings, Protocol protocol)
     : base(device, blockSettings, protocol)
 {
 }
Exemplo n.º 7
0
 public DeviceBlock_Modbus(DeviceAlgorithm device, BlockSettings blockSettings, Protocol protocol)
     : base(device, blockSettings, protocol)
 {
     CommandId = BlockSettings.CommandId;
     IsKLNEModbus = protocol.ProtocolSettings.Name == "KLNEModbus";
 }