private void SetWiringPM() { int index = packet.IArg1; if (server.Devices.PowerMeter.Count == 0) { return; } if (server.Devices.PowerMeter[index].Connected == false) { return; } EWT330Wiring wiring = (EWT330Wiring)packet.IArg2; UlWT330EthernetClient device = server.Devices.PowerMeter[index]; logger.Log((int)EListenerLogItem.Note, "Changed wiring on Power Meter({0}) to {2}", device.IpPoint.ToString(), wiring.ToString()); device.SetWiring(wiring); }
public void SetWiring(EWT330Wiring wiring) { if (Mode == EEthernetMode.Virtual) { return; } //if (Phase == EWT330Phase.P1) return; switch (wiring) { case EWT330Wiring.P1W3: SendTcp(csCmdSetWiring1PW3); break; case EWT330Wiring.P3W3: SendTcp(csCmdSetWiring3PW3); break; case EWT330Wiring.P3W4: SendTcp(csCmdSetWiring3PW4); break; } }