From 8b75cacd46f99dc45bcdfda92828aadaf049bdd1 Mon Sep 17 00:00:00 2001 From: kasemir Date: Thu, 25 May 2017 17:35:21 -0400 Subject: [PATCH] Implement EtherNetIP#readTags() --- CHANGE_LOG | 3 ++- src/etherip/EtherNetIP.java | 11 +++++++---- test/etherip/EtherIPDemo.java | 19 +++++++++++++------ 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/CHANGE_LOG b/CHANGE_LOG index b5d1dae..66f4ed2 100644 --- a/CHANGE_LOG +++ b/CHANGE_LOG @@ -4,7 +4,8 @@ Changes Version number is in EtherNetIP.version * 1.2 - 2017/05/25 -Fix: Support reading and writing STRING tags (#12) +Fix: Support reading and writing STRING tags (#12). + Implement EtherNetIP#readTags() * 1.1 - 2016/12/15 Fix: Handle path tags like "array[2].element" (#8) diff --git a/src/etherip/EtherNetIP.java b/src/etherip/EtherNetIP.java index d88d8bc..867a156 100644 --- a/src/etherip/EtherNetIP.java +++ b/src/etherip/EtherNetIP.java @@ -179,10 +179,10 @@ public CIPData readTag(final String tag, short count) throws Exception /** Read multiple scalar tags in one network transaction * @param tags Tag names - * @return Current value of the tag + * @return Current values of the tags * @throws Exception on error */ - public CIPData readTags(final String... tags) throws Exception + public CIPData[] readTags(final String... tags) throws Exception { final MRChipReadProtocol[] reads = new MRChipReadProtocol[tags.length]; for (int i=0; i