Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion generator/sbpg/targets/resources/sbp_java.java.j2
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public class (((m.identifier | classnameify))) extends SBPMessage {
public (((m.identifier | classnameify))) () { super(TYPE); }
public (((m.identifier | classnameify))) (SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException("Type mismatch for (((m.identifier | classnameify))), expected (((m.sbp_id))), actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/acquisition/MsgAcqResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public MsgAcqResult() {

public MsgAcqResult(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgAcqResult, expected 47, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public MsgAcqResultDepA() {

public MsgAcqResultDepA(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgAcqResultDepA, expected 21, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public MsgAcqResultDepB() {

public MsgAcqResultDepB(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgAcqResultDepB, expected 20, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public MsgAcqResultDepC() {

public MsgAcqResultDepC(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgAcqResultDepC, expected 31, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public MsgAcqSvProfile() {

public MsgAcqSvProfile(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgAcqSvProfile, expected 46, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public MsgAcqSvProfileDep() {

public MsgAcqSvProfileDep(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgAcqSvProfileDep, expected 30, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ public MsgBootloaderHandshakeDepA() {

public MsgBootloaderHandshakeDepA(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgBootloaderHandshakeDepA, expected 176, actual "
+ msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public MsgBootloaderHandshakeReq() {

public MsgBootloaderHandshakeReq(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgBootloaderHandshakeReq, expected 179, actual "
+ msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ public MsgBootloaderHandshakeResp() {

public MsgBootloaderHandshakeResp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgBootloaderHandshakeResp, expected 180, actual "
+ msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public MsgBootloaderJumpToApp() {

public MsgBootloaderJumpToApp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgBootloaderJumpToApp, expected 177, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public MsgNapDeviceDnaReq() {

public MsgNapDeviceDnaReq(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgNapDeviceDnaReq, expected 222, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public MsgNapDeviceDnaResp() {

public MsgNapDeviceDnaResp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgNapDeviceDnaResp, expected 221, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/ext_events/MsgExtEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public MsgExtEvent() {

public MsgExtEvent(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgExtEvent, expected 257, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/file_io/MsgFileioConfigReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public MsgFileioConfigReq() {

public MsgFileioConfigReq(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioConfigReq, expected 4097, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public MsgFileioConfigResp() {

public MsgFileioConfigResp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioConfigResp, expected 4098, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public MsgFileioReadDirReq() {

public MsgFileioReadDirReq(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioReadDirReq, expected 169, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public MsgFileioReadDirResp() {

public MsgFileioReadDirResp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioReadDirResp, expected 170, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/file_io/MsgFileioReadReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public MsgFileioReadReq() {

public MsgFileioReadReq(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioReadReq, expected 168, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/file_io/MsgFileioReadResp.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public MsgFileioReadResp() {

public MsgFileioReadResp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioReadResp, expected 163, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/file_io/MsgFileioRemove.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public MsgFileioRemove() {

public MsgFileioRemove(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioRemove, expected 172, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/file_io/MsgFileioWriteReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public MsgFileioWriteReq() {

public MsgFileioWriteReq(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioWriteReq, expected 173, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/file_io/MsgFileioWriteResp.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public MsgFileioWriteResp() {

public MsgFileioWriteResp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFileioWriteResp, expected 171, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/flash/MsgFlashDone.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public MsgFlashDone() {

public MsgFlashDone(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFlashDone, expected 224, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/flash/MsgFlashErase.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public MsgFlashErase() {

public MsgFlashErase(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFlashErase, expected 226, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/flash/MsgFlashProgram.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public MsgFlashProgram() {

public MsgFlashProgram(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFlashProgram, expected 230, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/flash/MsgFlashReadReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public MsgFlashReadReq() {

public MsgFlashReadReq(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFlashReadReq, expected 231, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/flash/MsgFlashReadResp.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public MsgFlashReadResp() {

public MsgFlashReadResp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgFlashReadResp, expected 225, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public MsgM25FlashWriteStatus() {

public MsgM25FlashWriteStatus(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgM25FlashWriteStatus, expected 243, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public MsgStmFlashLockSector() {

public MsgStmFlashLockSector(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgStmFlashLockSector, expected 227, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public MsgStmFlashUnlockSector() {

public MsgStmFlashUnlockSector(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgStmFlashUnlockSector, expected 228, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/flash/MsgStmUniqueIdReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public MsgStmUniqueIdReq() {

public MsgStmUniqueIdReq(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgStmUniqueIdReq, expected 232, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/flash/MsgStmUniqueIdResp.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public MsgStmUniqueIdResp() {

public MsgStmUniqueIdResp(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgStmUniqueIdResp, expected 229, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/imu/MsgImuAux.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public MsgImuAux() {

public MsgImuAux(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgImuAux, expected 2305, actual " + msg.type);
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion java/src/com/swiftnav/sbp/imu/MsgImuRaw.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public MsgImuRaw() {

public MsgImuRaw(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgImuRaw, expected 2304, actual " + msg.type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ public MsgSsrFlagHighLevel() {

public MsgSsrFlagHighLevel(SBPMessage msg) throws SBPBinaryException {
super(msg);
assert msg.type == TYPE;
if (msg.type != TYPE)
throw new SBPBinaryException(
"Type mismatch for MsgSsrFlagHighLevel, expected 3001, actual " + msg.type);
}

@Override
Expand Down
Loading