aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Arnavi4Protocol.java
diff options
context:
space:
mode:
authorIvan Muratov <binakot@gmail.com>2017-07-14 08:48:27 +0300
committerIvan Muratov <binakot@gmail.com>2017-07-14 08:48:27 +0300
commit50d45d27beb423c1689f83401d0adb88b7fafb65 (patch)
tree9e40c2bf7d581c8987dfa8cb562b1e8d1c831c04 /src/org/traccar/protocol/Arnavi4Protocol.java
parenta2376cf6354a94c8bd8c8e13c4e78936d4f2ae97 (diff)
downloadtraccar-server-50d45d27beb423c1689f83401d0adb88b7fafb65.tar.gz
traccar-server-50d45d27beb423c1689f83401d0adb88b7fafb65.tar.bz2
traccar-server-50d45d27beb423c1689f83401d0adb88b7fafb65.zip
Correction based on comments.
Re-write modulo256 checksum's parameter to byte array, not varargs. Split the tests to two methods for HEADER ver1 and ver2. Remove above-class copyrights, added top-file copyrights. Rename parcelNumber to index. Rename recordStartSign to recordType. Remove crearing additional buffer for record data, use origin buffer instead. Added check on minimal length of packet to avoid the out-of-range exceptions.
Diffstat (limited to 'src/org/traccar/protocol/Arnavi4Protocol.java')
-rw-r--r--src/org/traccar/protocol/Arnavi4Protocol.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Arnavi4Protocol.java b/src/org/traccar/protocol/Arnavi4Protocol.java
index 227397980..381a9b457 100644
--- a/src/org/traccar/protocol/Arnavi4Protocol.java
+++ b/src/org/traccar/protocol/Arnavi4Protocol.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2017 Ivan Muratov (binakot@gmail.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.traccar.protocol;
import org.jboss.netty.bootstrap.ServerBootstrap;
@@ -8,9 +23,6 @@ import org.traccar.TrackerServer;
import java.nio.ByteOrder;
import java.util.List;
-/**
- * Created by Ivan Muratov @binakot on 11.07.2017.
- */
public class Arnavi4Protocol extends BaseProtocol {
public Arnavi4Protocol() {