| | |
| | | |
| | | import Mocker.IDeviceMocker; |
| | | import art.library.interop.serialization.Serialization; |
| | | import art.library.interop.serialization.SerializationException; |
| | | import art.library.model.devices.Device; |
| | | import art.library.model.devices.colors.controller.RTZ32.RTZ32_Controller; |
| | | import art.library.model.devices.colors.controller.RTZ32.RTZ32_ControllerInformation; |
| | | import art.library.model.devices.colors.controller.RTZ32.status.RTZ32_Status_General; |
| | | import devices.mockers.LocalFileDeviceMocker; |
| | | import java.io.File; |
| | | import java.util.Random; |
| | | import svgdevicestest.mock.*; |
| | |
| | | { |
| | | private final static Random rnd = new Random(); |
| | | |
| | | public RtzMockerMapComplex() |
| | | public RtzMockerMapComplex() throws SerializationException |
| | | { |
| | | super(new LocalFileDeviceMocker<RTZ32_Controller>(RTZ32_Controller.class).getDevice(), new LocalFileDeviceMocker<RTZ32_Controller>(RTZ32_Controller.class).getDevice().getDeviceCommandsEmpty()); |
| | | super((Device)Serialization.deserialize(RTZ32_Controller.class, new File("C:\\Users\\Konstantin\\Desktop\\rtz_svg.txt"))); |
| | | } |
| | | |
| | | public RtzMockerMapComplex getMocker() |
| | |
| | | // information.mode = RTZ32_ControllerInformation.MODE_NON_CENTRALIZED; |
| | | // } |
| | | |
| | | Device d = Serialization.deserialize(RTZ32_Controller.class, new File("C:\\Users\\Konstantin\\Desktop\\rtz.txt")); |
| | | |
| | | RTZ32_Controller controller = (RTZ32_Controller) d; |
| | | |
| | | d.setAlarm("alarm_offline", false); |
| | | |
| | | controller.getDeviceAlarms().rtz32.flashing.alarm_flashing_bus_I2C = 1000; |
| | | |
| | | controller.getDeviceInformation().mode = RTZ32_ControllerInformation.MODE_CENTRALIZED; |
| | | |
| | | // controller.getDeviceStatus().rtz32.centralized = new RTZ32_Status_Centralized(); |
| | | // { |
| | | // controller.getDeviceStatus().rtz32.centralized.centralized = false; |
| | | // } |
| | | |
| | | controller.getDeviceStatus().rtz32.general.control = RTZ32_Status_General.CONTROL_LOCAL; |
| | | |
| | | device.status = controller.status; |
| | | device.information = controller.information; |
| | | device.configuration = controller.configuration; |
| | | device.alarms = controller.alarms; |
| | | Device d = Serialization.deserialize(RTZ32_Controller.class, new File("C:\\Users\\Konstantin\\Desktop\\rtz_svg.txt")); |
| | | device = d; |
| | | // RTZ32_Controller controller = (RTZ32_Controller) d; |
| | | // |
| | | // d.setAlarm("alarm_offline", false); |
| | | // |
| | | // controller.getDeviceAlarms().rtz32.flashing.alarm_flashing_bus_I2C = 1000; |
| | | // |
| | | // controller.getDeviceInformation().mode = RTZ32_ControllerInformation.MODE_CENTRALIZED; |
| | | // |
| | | //// controller.getDeviceStatus().rtz32.centralized = new RTZ32_Status_Centralized(); |
| | | //// { |
| | | //// controller.getDeviceStatus().rtz32.centralized.centralized = false; |
| | | //// } |
| | | // |
| | | // controller.getDeviceStatus().rtz32.general.control = RTZ32_Status_General.CONTROL_LOCAL; |
| | | // |
| | | // device.status = controller.status; |
| | | // device.information = controller.information; |
| | | // device.configuration = controller.configuration; |
| | | // device.alarms = controller.alarms; |
| | | |
| | | |
| | | // |