void manager (struct plc * plc, signed count, signed pause) { while (count--) { if (_anyset (plc->flags, PLC_VERSION)) { VersionInfo1 (plc); } if (_anyset (plc->flags, PLC_LOCAL_TRAFFIC)) { Traffic1 (plc); } if (_anyset (plc->flags, PLC_NETWORK_TRAFFIC)) { NetworkTraffic1 (plc); } if (_anyset (plc->flags, PLC_NETWORK)) { PhyRates1 (plc); } if (_anyset (plc->flags, PLC_RESET_DEVICE)) { ResetDevice (plc); } sleep (pause); } return; }
static void manager (struct plc * plc, signed count, signed pause) { while (count--) { if (_anyset (plc->flags, PLC_VERSION)) { VersionInfo1 (plc); } if (_anyset (plc->flags, PLC_ATTRIBUTES)) { Attributes1 (plc); } if (_anyset (plc->flags, PLC_WATCHDOG_REPORT)) { WatchdogReport (plc); } if (_anyset (plc->flags, PLC_NVRAM_INFO)) { NVRAMInfo (plc); } if (_anyset (plc->flags, PLC_SDRAM_INFO)) { SDRAMInfo (plc); } if (_anyset (plc->flags, PLC_READ_IDENTITY)) { Identity1 (plc); } if (_anyset (plc->flags, PLC_NETWORK)) { NetInfo1 (plc); } if (_anyset (plc->flags, PLC_SDRAM_CONFIG)) { WriteCFG (plc); } if (_anyset (plc->flags, PLC_WRITE_MAC)) { WriteNVM (plc); } if (_anyset (plc->flags, PLC_READ_MAC)) { ReadFirmware1 (plc); } if (_anyset (plc->flags, PLC_WRITE_PIB)) { WritePIB (plc); } if (_anyset (plc->flags, PLC_READ_PIB)) { ReadParameters1 (plc); } if (_anyset (plc->flags, PLC_HOST_ACTION)) { HostActionResponse (plc); } if (_anyset (plc->flags, PLC_PUSH_BUTTON)) { PushButton (plc); } if (_anyset (plc->flags, (PLC_SETLOCALKEY | PLC_SETREMOTEKEY))) { SetNMK (plc); } if (_anyset (plc->flags, PLC_FACTORY_DEFAULTS)) { FactoryDefaults (plc); } if (_anyset (plc->flags, PLC_FLASH_DEVICE)) { FlashNVM (plc); WaitForRestart (plc); } if (_anyset (plc->flags, PLC_RESET_DEVICE)) { ResetDevice (plc); } sleep (pause); } return; }