Skip to content

Commit

Permalink
Added method to read ewon serial num
Browse files Browse the repository at this point in the history
  • Loading branch information
TomKimsey committed Oct 9, 2023
1 parent 23a5f65 commit 6ada1ef
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit 6ada1ef

Please sign in to comment.