CWS-TOOLING: integrate CWS fwk136_DEV300
This commit is contained in:
commit
36c6c955b8
1 changed files with 21 additions and 8 deletions
|
@ -95,12 +95,12 @@ public class SystemEnvironment {
|
||||||
this.systemManufacturer = "";
|
this.systemManufacturer = "";
|
||||||
this.cpuManufacturer = "";
|
this.cpuManufacturer = "";
|
||||||
this.serialNumber = "";
|
this.serialNumber = "";
|
||||||
this.physmem = "";
|
this.physmem = "0";
|
||||||
this.sockets = "";
|
this.sockets = "0";
|
||||||
this.cores = "";
|
this.cores = "0";
|
||||||
this.virtcpus = "";
|
this.virtcpus = "0";
|
||||||
this.cpuname = "";
|
this.cpuname = "";
|
||||||
this.clockrate = "";
|
this.clockrate = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,6 +173,8 @@ public class SystemEnvironment {
|
||||||
* @param physmem The physmem to set.
|
* @param physmem The physmem to set.
|
||||||
*/
|
*/
|
||||||
public void setPhysMem(String physmem) {
|
public void setPhysMem(String physmem) {
|
||||||
|
if (physmem.length() == 0)
|
||||||
|
physmem = "0";
|
||||||
this.physmem = physmem;
|
this.physmem = physmem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,6 +183,8 @@ public class SystemEnvironment {
|
||||||
* @param sockets The sockets to set.
|
* @param sockets The sockets to set.
|
||||||
*/
|
*/
|
||||||
public void setSockets(String sockets) {
|
public void setSockets(String sockets) {
|
||||||
|
if (sockets.length() == 0)
|
||||||
|
sockets = "0";
|
||||||
this.sockets = sockets;
|
this.sockets = sockets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +193,8 @@ public class SystemEnvironment {
|
||||||
* @param cores The cores to set.
|
* @param cores The cores to set.
|
||||||
*/
|
*/
|
||||||
public void setCores(String cores) {
|
public void setCores(String cores) {
|
||||||
|
if (cores.length() == 0)
|
||||||
|
cores ="0";
|
||||||
this.cores = cores;
|
this.cores = cores;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,6 +203,8 @@ public class SystemEnvironment {
|
||||||
* @param virtcpus The virtcpus to set.
|
* @param virtcpus The virtcpus to set.
|
||||||
*/
|
*/
|
||||||
public void setVirtCpus(String virtcpus) {
|
public void setVirtCpus(String virtcpus) {
|
||||||
|
if (virtcpus.length() == 0)
|
||||||
|
virtcpus = "0";
|
||||||
this.virtcpus = virtcpus;
|
this.virtcpus = virtcpus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,10 +221,15 @@ public class SystemEnvironment {
|
||||||
* @param clockrate The clockrate to set.
|
* @param clockrate The clockrate to set.
|
||||||
*/
|
*/
|
||||||
public void setClockRate(String clockrate) {
|
public void setClockRate(String clockrate) {
|
||||||
|
if (clockrate.length() == 0)
|
||||||
|
this.clockrate = "0";
|
||||||
|
else
|
||||||
|
{
|
||||||
Float f = Float.parseFloat(clockrate);
|
Float f = Float.parseFloat(clockrate);
|
||||||
Integer nClockrate = f.intValue();
|
Integer nClockrate = f.intValue();
|
||||||
this.clockrate = nClockrate.toString();
|
this.clockrate = nClockrate.toString();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the hostid. Truncates to a max length of 16 chars.
|
* Sets the hostid. Truncates to a max length of 16 chars.
|
||||||
|
|
Loading…
Reference in a new issue