pridano snmp map value - zobrazeni, pridani, editace, odebrani

verze3
Michal 2026-09-04 20:44:26 +02:00
parent 6ccd0bb4b7
commit eddb65712e
4 changed files with 93 additions and 133 deletions

View File

@ -96,12 +96,20 @@ public class Message implements Serializable {
public static final int DEVICE_TYPE_DELETE_RESULT = 145;
// S->C smazani uzovatele
public static final int USER_DELETE_RESULT = 146;
// S->C odpoved uzivatelskeho pingu
public static final int USER_PING_RESPONSE = 147;
// S->C start uzivatelskeho pingu
public static final int USER_PING_STARTED = 148;
// S->C stop uzivatelskeho pingu
public static final int USER_PING_STOPPED = 149;
// S->C log serveru
public static final int SERVER_LOG_RESULT = 150;
// S->C nove snmp mapovani hodnot
public static final int VALUE_MAP_NEW_RESULT = 151;
// S->C uprava snmp mapovani hodnot
public static final int VALUE_MAP_EDIT_RESULT = 152;
// S->C smazani snmp mapovani hodnot
public static final int VALUE_MAP_DELETE_RESULT = 153;
///////////////////////////////////////////////////
@ -175,11 +183,18 @@ public class Message implements Serializable {
public static final int DEVICE_TYPE_DELETE = 533;
// C->S smazani uzovatele
public static final int USER_DELETE = 534;
// C->S uzivatelsky ping start
public static final int USER_PING_START = 535;
// C->S uzivatelsky ping stop
public static final int USER_PING_STOP = 536;
// C->S dotaz na log serveru
public static final int SERVER_LOG = 537;
// C->S nove snmp mapovani hodnot
public static final int VALUE_MAP_NEW = 538;
// C->S uprava snmp mapovani hodnot
public static final int VALUE_MAP_EDIT = 539;
// C->S smazani snmp mapovani hodnot
public static final int VALUE_MAP_DELETE = 540;
///////////////////////////////////////////////////

View File

@ -1,7 +1,6 @@
package jnet.lib.object;
import java.io.Serializable;
import java.util.List;
import org.snmp4j.smi.Variable;
@ -151,74 +150,5 @@ public class NodeProbe implements Serializable {
this.viewOnMap = viewOnMap;
}
public static class ValueMap {
private int id;
private String name;
private List<Item> item;
public ValueMap(int id, String name, List<Item> item) {
this.id = id;
this.name = name;
this.item = item;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static class Item {
int id;
String rawValue;
String mappedValue;
public Item(int id, String rawValue, String mappedValue) {
this.id = id;
this.rawValue = rawValue;
this.mappedValue = mappedValue;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getRawValue() {
return rawValue;
}
public void setRawValue(String rawValue) {
this.rawValue = rawValue;
}
public String getMappedValue() {
return mappedValue;
}
public void setMappedValue(String mappedValue) {
this.mappedValue = mappedValue;
}
}
}
}

View File

@ -3,73 +3,43 @@ package jnet.lib.object;
import java.io.Serializable;
import java.util.List;
public class SnmpValueMap implements Serializable {
public class SnmpValueMap implements Serializable{
private int id;
private String name;
private List<Item> item;
private int id;
private String name;
private List<SnmpValueMapItem> item;
public SnmpValueMap(int id, String name, List<Item> item) {
this.id = id;
this.name = name;
this.item = item;
}
public SnmpValueMap(int id, String name, List<SnmpValueMapItem> item) {
this.id = id;
this.name = name;
this.item = item;
}
public SnmpValueMap() {
}
public int getId() {
return id;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void setName(String name) {
this.name = name;
}
public static class Item implements Serializable {
int id;
String rawValue;
String mappedValue;
public List<SnmpValueMapItem> getItem() {
return item;
}
public Item(int id, String rawValue, String mappedValue) {
this.id = id;
this.rawValue = rawValue;
this.mappedValue = mappedValue;
}
public void setItem(List<SnmpValueMapItem> item) {
this.item = item;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getRawValue() {
return rawValue;
}
public void setRawValue(String rawValue) {
this.rawValue = rawValue;
}
public String getMappedValue() {
return mappedValue;
}
public void setMappedValue(String mappedValue) {
this.mappedValue = mappedValue;
}
}
}
}

View File

@ -0,0 +1,45 @@
package jnet.lib.object;
import java.io.Serializable;
public class SnmpValueMapItem implements Serializable {
int id;
String rawValue;
String mappedValue;
public SnmpValueMapItem(int id, String rawValue, String mappedValue) {
this.id = id;
this.rawValue = rawValue;
this.mappedValue = mappedValue;
}
public SnmpValueMapItem(String rawValue, String mappedValue) {
this.rawValue = rawValue;
this.mappedValue = mappedValue;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getRawValue() {
return rawValue;
}
public void setRawValue(String rawValue) {
this.rawValue = rawValue;
}
public String getMappedValue() {
return mappedValue;
}
public void setMappedValue(String mappedValue) {
this.mappedValue = mappedValue;
}
}