Skip to content

Commit 13fb597

Browse files
committed
Don't hide Java files.
1 parent 7625b11 commit 13fb597

File tree

81 files changed

+6589
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+6589
-14
lines changed

java/.gitignore

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
src/com/swiftnav/sbp/acquisition
2-
src/com/swiftnav/sbp/bootload
3-
src/com/swiftnav/sbp/ext_events
4-
src/com/swiftnav/sbp/file_io
5-
src/com/swiftnav/sbp/flash
6-
src/com/swiftnav/sbp/logging
7-
src/com/swiftnav/sbp/navigation
8-
src/com/swiftnav/sbp/observation
9-
src/com/swiftnav/sbp/piksi
10-
src/com/swiftnav/sbp/settings
11-
src/com/swiftnav/sbp/system
12-
src/com/swiftnav/sbp/tracking
13-
src/com/swiftnav/sbp/user
14-
src/com/swiftnav/sbp/client/MessageTable.java
151
.gradle
162
.idea
173
*.class
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*
2+
* Copyright (C) 2015 Swift Navigation Inc.
3+
* Contact: Gareth McMullin <[email protected]>
4+
* Contact: Bhaskar Mookerji <[email protected]>
5+
*
6+
* This source is subject to the license found in the file 'LICENSE' which must
7+
* be be distributed together with this source. All other rights reserved.
8+
*
9+
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10+
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
11+
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12+
*/
13+
14+
package com.swiftnav.sbp.acquisition;
15+
16+
import com.swiftnav.sbp.SBPMessage;
17+
import com.swiftnav.sbp.SBPBinaryException;
18+
import com.swiftnav.sbp.SBPStruct;
19+
import com.swiftnav.sbp.gnss_signal.*;
20+
21+
import org.json.JSONObject;
22+
import org.json.JSONArray;
23+
24+
25+
/** SBP class for message MSG_ACQ_RESULT (0x0014).
26+
*
27+
* You can have MSG_ACQ_RESULT inherent its fields directly from
28+
* an inherited SBP object, or construct it inline using a dict of its
29+
* fields.
30+
*
31+
* This message describes the results from an attempted GPS signal
32+
* acquisition search for a satellite PRN over a code phase/carrier
33+
* frequency range. It contains the parameters of the point in the
34+
* acquisition search space with the best signal-to-noise (SNR)
35+
* ratio. */
36+
37+
public class MsgAcqResult extends SBPMessage {
38+
public static final int TYPE = 0x0014;
39+
40+
41+
/** SNR of best point. Currently in arbitrary SNR points, but will
42+
be in units of dB Hz in a later revision of this message.
43+
*/
44+
public float snr;
45+
46+
/** Code phase of best point */
47+
public float cp;
48+
49+
/** Carrier frequency of best point */
50+
public float cf;
51+
52+
/** GNSS signal for which acquisition was attempted */
53+
public GnssSignal sid;
54+
55+
56+
public MsgAcqResult (int sender) { super(sender, TYPE); }
57+
public MsgAcqResult () { super(TYPE); }
58+
public MsgAcqResult (SBPMessage msg) throws SBPBinaryException {
59+
super(msg);
60+
assert msg.type != TYPE;
61+
}
62+
63+
@Override
64+
protected void parse(Parser parser) throws SBPBinaryException {
65+
/* Parse fields from binary */
66+
snr = parser.getFloat();
67+
cp = parser.getFloat();
68+
cf = parser.getFloat();
69+
sid = new GnssSignal().parse(parser);
70+
}
71+
72+
@Override
73+
protected void build(Builder builder) {
74+
builder.putFloat(snr);
75+
builder.putFloat(cp);
76+
builder.putFloat(cf);
77+
sid.build(builder);
78+
}
79+
80+
@Override
81+
public JSONObject toJSON() {
82+
JSONObject obj = super.toJSON();
83+
obj.put("snr", snr);
84+
obj.put("cp", cp);
85+
obj.put("cf", cf);
86+
obj.put("sid", sid.toJSON());
87+
return obj;
88+
}
89+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright (C) 2015 Swift Navigation Inc.
3+
* Contact: Gareth McMullin <[email protected]>
4+
* Contact: Bhaskar Mookerji <[email protected]>
5+
*
6+
* This source is subject to the license found in the file 'LICENSE' which must
7+
* be be distributed together with this source. All other rights reserved.
8+
*
9+
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10+
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
11+
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12+
*/
13+
14+
package com.swiftnav.sbp.acquisition;
15+
16+
import com.swiftnav.sbp.SBPMessage;
17+
import com.swiftnav.sbp.SBPBinaryException;
18+
import com.swiftnav.sbp.SBPStruct;
19+
import com.swiftnav.sbp.gnss_signal.*;
20+
21+
import org.json.JSONObject;
22+
import org.json.JSONArray;
23+
24+
25+
/** SBP class for message MSG_ACQ_RESULT_DEP_A (0x0015).
26+
*
27+
* You can have MSG_ACQ_RESULT_DEP_A inherent its fields directly from
28+
* an inherited SBP object, or construct it inline using a dict of its
29+
* fields.
30+
*
31+
* Deprecated. */
32+
33+
public class MsgAcqResultDepA extends SBPMessage {
34+
public static final int TYPE = 0x0015;
35+
36+
37+
/** SNR of best point. Currently dimensonless, but will have
38+
units of dB Hz in the revision of this message.
39+
*/
40+
public float snr;
41+
42+
/** Code phase of best point */
43+
public float cp;
44+
45+
/** Carrier frequency of best point */
46+
public float cf;
47+
48+
/** PRN-1 identifier of the satellite signal for which
49+
acquisition was attempted
50+
*/
51+
public int prn;
52+
53+
54+
public MsgAcqResultDepA (int sender) { super(sender, TYPE); }
55+
public MsgAcqResultDepA () { super(TYPE); }
56+
public MsgAcqResultDepA (SBPMessage msg) throws SBPBinaryException {
57+
super(msg);
58+
assert msg.type != TYPE;
59+
}
60+
61+
@Override
62+
protected void parse(Parser parser) throws SBPBinaryException {
63+
/* Parse fields from binary */
64+
snr = parser.getFloat();
65+
cp = parser.getFloat();
66+
cf = parser.getFloat();
67+
prn = parser.getU8();
68+
}
69+
70+
@Override
71+
protected void build(Builder builder) {
72+
builder.putFloat(snr);
73+
builder.putFloat(cp);
74+
builder.putFloat(cf);
75+
builder.putU8(prn);
76+
}
77+
78+
@Override
79+
public JSONObject toJSON() {
80+
JSONObject obj = super.toJSON();
81+
obj.put("snr", snr);
82+
obj.put("cp", cp);
83+
obj.put("cf", cf);
84+
obj.put("prn", prn);
85+
return obj;
86+
}
87+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Copyright (C) 2015 Swift Navigation Inc.
3+
* Contact: Gareth McMullin <[email protected]>
4+
* Contact: Bhaskar Mookerji <[email protected]>
5+
*
6+
* This source is subject to the license found in the file 'LICENSE' which must
7+
* be be distributed together with this source. All other rights reserved.
8+
*
9+
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10+
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
11+
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12+
*/
13+
14+
package com.swiftnav.sbp.bootload;
15+
16+
import com.swiftnav.sbp.SBPMessage;
17+
import com.swiftnav.sbp.SBPBinaryException;
18+
import com.swiftnav.sbp.SBPStruct;
19+
20+
import org.json.JSONObject;
21+
import org.json.JSONArray;
22+
23+
24+
/** SBP class for message MSG_BOOTLOADER_HANDSHAKE_DEP_A (0x00B0).
25+
*
26+
* You can have MSG_BOOTLOADER_HANDSHAKE_DEP_A inherent its fields directly from
27+
* an inherited SBP object, or construct it inline using a dict of its
28+
* fields.
29+
*
30+
* Deprecated. */
31+
32+
public class MsgBootloaderHandshakeDepA extends SBPMessage {
33+
public static final int TYPE = 0x00B0;
34+
35+
36+
/** Version number string (not NULL terminated) */
37+
public int[] handshake;
38+
39+
40+
public MsgBootloaderHandshakeDepA (int sender) { super(sender, TYPE); }
41+
public MsgBootloaderHandshakeDepA () { super(TYPE); }
42+
public MsgBootloaderHandshakeDepA (SBPMessage msg) throws SBPBinaryException {
43+
super(msg);
44+
assert msg.type != TYPE;
45+
}
46+
47+
@Override
48+
protected void parse(Parser parser) throws SBPBinaryException {
49+
/* Parse fields from binary */
50+
handshake = parser.getArrayofU8();
51+
}
52+
53+
@Override
54+
protected void build(Builder builder) {
55+
builder.putArrayofU8(handshake);
56+
}
57+
58+
@Override
59+
public JSONObject toJSON() {
60+
JSONObject obj = super.toJSON();
61+
obj.put("handshake", new JSONArray(handshake));
62+
return obj;
63+
}
64+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Copyright (C) 2015 Swift Navigation Inc.
3+
* Contact: Gareth McMullin <[email protected]>
4+
* Contact: Bhaskar Mookerji <[email protected]>
5+
*
6+
* This source is subject to the license found in the file 'LICENSE' which must
7+
* be be distributed together with this source. All other rights reserved.
8+
*
9+
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10+
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
11+
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12+
*/
13+
14+
package com.swiftnav.sbp.bootload;
15+
16+
import com.swiftnav.sbp.SBPMessage;
17+
import com.swiftnav.sbp.SBPBinaryException;
18+
import com.swiftnav.sbp.SBPStruct;
19+
20+
import org.json.JSONObject;
21+
import org.json.JSONArray;
22+
23+
24+
/** SBP class for message MSG_BOOTLOADER_HANDSHAKE_REQ (0x00B3).
25+
*
26+
* You can have MSG_BOOTLOADER_HANDSHAKE_REQ inherent its fields directly from
27+
* an inherited SBP object, or construct it inline using a dict of its
28+
* fields.
29+
*
30+
* The handshake message request from the host establishes a
31+
* handshake between the device bootloader and the host. The
32+
* response from the device is MSG_BOOTLOADER_HANDSHAKE_RESP. */
33+
34+
public class MsgBootloaderHandshakeReq extends SBPMessage {
35+
public static final int TYPE = 0x00B3;
36+
37+
38+
39+
public MsgBootloaderHandshakeReq (int sender) { super(sender, TYPE); }
40+
public MsgBootloaderHandshakeReq () { super(TYPE); }
41+
public MsgBootloaderHandshakeReq (SBPMessage msg) throws SBPBinaryException {
42+
super(msg);
43+
assert msg.type != TYPE;
44+
}
45+
46+
@Override
47+
protected void parse(Parser parser) throws SBPBinaryException {
48+
/* Parse fields from binary */
49+
}
50+
51+
@Override
52+
protected void build(Builder builder) {
53+
}
54+
55+
@Override
56+
public JSONObject toJSON() {
57+
JSONObject obj = super.toJSON();
58+
return obj;
59+
}
60+
}

0 commit comments

Comments
 (0)