|
@ -14,6 +14,7 @@ public class ItemProtocol { |
|
|
public static String item_heartbeat = "heartbeat"; |
|
|
public static String item_heartbeat = "heartbeat"; |
|
|
public static String item_mode = "mode"; |
|
|
public static String item_mode = "mode"; |
|
|
public static String item_move = "move"; |
|
|
public static String item_move = "move"; |
|
|
|
|
|
public static String item_action = "action"; |
|
|
public static String item_ioaction = "ioaction"; |
|
|
public static String item_ioaction = "ioaction"; |
|
|
public static String item_error = "error"; |
|
|
public static String item_error = "error"; |
|
|
public static String item_task = "task"; |
|
|
public static String item_task = "task"; |
|
@ -36,6 +37,10 @@ public class ItemProtocol { |
|
|
return this.getOpcIntegerValue(item_mode); |
|
|
return this.getOpcIntegerValue(item_mode); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getAction() { |
|
|
|
|
|
return this.getOpcIntegerValue(item_action); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public int getMove() { |
|
|
public int getMove() { |
|
|
return this.getOpcIntegerValue(item_move); |
|
|
return this.getOpcIntegerValue(item_move); |
|
|
} |
|
|
} |
|
@ -86,19 +91,20 @@ public class ItemProtocol { |
|
|
|
|
|
|
|
|
public static List<ItemDto> getReadableItemDtos() { |
|
|
public static List<ItemDto> getReadableItemDtos() { |
|
|
ArrayList list = new ArrayList(); |
|
|
ArrayList list = new ArrayList(); |
|
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0")); |
|
|
list.add(new ItemDto(item_heartbeat, "心跳", "DB510.B0")); |
|
|
list.add(new ItemDto(item_mode, "工作状态", "DB600.B2", Boolean.valueOf(true))); |
|
|
list.add(new ItemDto(item_mode, "工作状态", "DB510.B2", Boolean.valueOf(true))); |
|
|
list.add(new ItemDto(item_move, "光电开关信号", "DB600.B3")); |
|
|
list.add(new ItemDto(item_move, "光电开关信号", "DB510.B3")); |
|
|
list.add(new ItemDto(item_error, "报警信号", "DB600.B7")); |
|
|
list.add(new ItemDto(item_action, "动作信号", "DB510.B4")); |
|
|
list.add(new ItemDto(item_task, "任务号", "DB600.D10")); |
|
|
list.add(new ItemDto(item_error, "报警信号", "DB510.B7")); |
|
|
|
|
|
list.add(new ItemDto(item_task, "任务号", "DB510.D10")); |
|
|
return list; |
|
|
return list; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static List<ItemDto> getWriteableItemDtos() { |
|
|
public static List<ItemDto> getWriteableItemDtos() { |
|
|
ArrayList list = new ArrayList(); |
|
|
ArrayList list = new ArrayList(); |
|
|
list.add(new ItemDto(item_to_command, "作业命令", "DB601.W2", Boolean.valueOf(true))); |
|
|
list.add(new ItemDto(item_to_command, "作业命令", "DB500.W2", Boolean.valueOf(true))); |
|
|
list.add(new ItemDto(item_to_target, "目标站", "DB601.W4")); |
|
|
list.add(new ItemDto(item_to_target, "目标站", "DB500.W4")); |
|
|
list.add(new ItemDto(item_to_task, "任务号", "DB601.D8")); |
|
|
list.add(new ItemDto(item_to_task, "任务号", "DB500.D8")); |
|
|
return list; |
|
|
return list; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|