ghy
Alejandro Acuña
2025-03-12 26319e4c5bfbee722c15b8e7ccca9b6127bb1cb8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package Rotapanel.mockers;
 
import Mocker.IDeviceMocker;
import Rotapanel.RotapanelMap;
import Rotapanel.RotapanelMap;
import art.library.model.devices.DeviceStatus;
import art.library.model.devices.barrier.BarrierRealtime;
import art.library.model.devices.vms.rotapanel.VmsRotapanel;
import art.library.model.devices.vms.rotapanel.VmsRotapanelAlarms;
import art.library.model.devices.vms.rotapanel.VmsRotapanelInformation;
import art.library.model.devices.vms.rotapanel.VmsRotapanelStatus;
import svgdevicestest.mock.*;
 
public class RotapanelMocker extends DeviceMocker implements IDeviceMocker
{
 
    public RotapanelMocker() 
    {
        super(new VmsRotapanel("rotapanel"));
    }
 
    public RotapanelMocker getMocker() 
    {
        return this;
    }
 
    @Override
    public void updateDevice(boolean active) 
    {
        VmsRotapanel rotapanel = (VmsRotapanel) device;
        rotapanel.status = new VmsRotapanelStatus();
        rotapanel.alarms = new VmsRotapanelAlarms();
        rotapanel.information = new VmsRotapanelInformation();
        rotapanel.information.name = "Meritxell";
        ((VmsRotapanelStatus)rotapanel.status).status = DeviceStatus.STATUS_ONLINE;
        ((VmsRotapanelStatus)rotapanel.status).face = 1;
        rotapanel.getDeviceInformation().lforbiddenFace.add(1);
        rotapanel.setAlarm("alarm_complete", true);
        rotapanel.setAlarm("alarm_offline", false);
        rotapanel.setAlarm("alarm_invalid", false);
        rotapanel.setAlarm("alarm_closing", false);
        rotapanel.setAlarm("alarm_opening", false);
        rotapanel.realtime = new BarrierRealtime();
    }
 
    @Override
    public String getFilePath()
    {
        return "C:\\Users\\Konstantin\\Documents\\LocalBackup\\Obras\\Reszow\\rotapanelServer\\art.servers.rotapanelserver\\symbols\\18\\Prism.svg";
    }
 
    @Override
    public boolean isStatusMode()
    {
        return true;
    }
 
    @Override
    public Class getScriptClass()
    {
        return RotapanelMap.class;
    }
}