From 6ada1ef312086b8a0494a2be5c4e3a0921f80fc0 Mon Sep 17 00:00:00 2001 From: Tom Kimsey Date: Mon, 9 Oct 2023 15:47:38 -0400 Subject: [PATCH] Added method to read ewon serial num --- .../sc/extensions/system/info/SCSystemInfo.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/hms_networks/americas/sc/extensions/system/info/SCSystemInfo.java b/src/main/java/com/hms_networks/americas/sc/extensions/system/info/SCSystemInfo.java index 0d04450c..f8214aa0 100644 --- a/src/main/java/com/hms_networks/americas/sc/extensions/system/info/SCSystemInfo.java +++ b/src/main/java/com/hms_networks/americas/sc/extensions/system/info/SCSystemInfo.java @@ -23,6 +23,9 @@ public class SCSystemInfo { /** Key for accessing the java version item in a system control block. */ private static final String SCB_JAVA_VER_KEY = "JavaVersion"; + /** Key for accessing the ewon serial number in a system control block. */ + private static final String SCB_EWON_SERIAL_NUM_KEY = "SERNUM"; + /** Default major firmware version requirement */ private static final int DEFAULT_MIN_MAJOR_FW_VER = 14; @@ -118,6 +121,17 @@ public static String getEwonName() throws EWException { return SCB.getItem(SCB_EWON_NAME_KEY); } + /** + * Gets the serial number of the Ewon. + * + * @return The Ewon's serial number + * @throws EWException for Flexy specific Exception + */ + public static String getEwonSerialNum() throws EWException { + SysControlBlock SCB = new SysControlBlock(SysControlBlock.INF); + return SCB.getItem(SCB_EWON_SERIAL_NUM_KEY); + } + /** * Gets the firmware version string in "MAJOR.MINOR" format. *