diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-09-27 00:49:33 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-27 00:49:33 +1300 |
commit | 17d5fbb60d859abe366d52137ae2c3cea2de1f5a (patch) | |
tree | c957116ab5bf8098034c44617970a22a24528f6a /src/org/traccar/model | |
parent | b5fc7e0899475547da99c06319ede5cc68f647e4 (diff) | |
parent | 5a515b9e2995602a686436106922362910b8a5c1 (diff) | |
download | trackermap-server-17d5fbb60d859abe366d52137ae2c3cea2de1f5a.tar.gz trackermap-server-17d5fbb60d859abe366d52137ae2c3cea2de1f5a.tar.bz2 trackermap-server-17d5fbb60d859abe366d52137ae2c3cea2de1f5a.zip |
Merge pull request #3547 from Abyss777/teltonika_io
Improve Teltonika IO decoding
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r-- | src/org/traccar/model/CellTower.java | 6 | ||||
-rw-r--r-- | src/org/traccar/model/Position.java | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/model/CellTower.java b/src/org/traccar/model/CellTower.java index 2eb56dd33..6d1dfbd7f 100644 --- a/src/org/traccar/model/CellTower.java +++ b/src/org/traccar/model/CellTower.java @@ -106,4 +106,10 @@ public class CellTower { this.signalStrength = signalStrength; } + public void setOperator(long operator) { + String operatorString = String.valueOf(operator); + mobileCountryCode = Integer.parseInt(operatorString.substring(0, 3)); + mobileNetworkCode = Integer.parseInt(operatorString.substring(3)); + } + } diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java index 31af3d38a..93456b1b0 100644 --- a/src/org/traccar/model/Position.java +++ b/src/org/traccar/model/Position.java @@ -30,6 +30,7 @@ public class Position extends Message { public static final String KEY_SATELLITES_VISIBLE = "satVisible"; public static final String KEY_RSSI = "rssi"; public static final String KEY_GPS = "gps"; + public static final String KEY_ROAMING = "roaming"; public static final String KEY_EVENT = "event"; public static final String KEY_ALARM = "alarm"; public static final String KEY_STATUS = "status"; |