Skip to content
Snippets Groups Projects
Commit 2fc6bcf0 authored by Hampus Rosenquist's avatar Hampus Rosenquist
Browse files

Minor update towards auth-26

parent acdf5665
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,7 @@ public class AuthenticationData extends MessageData {
Operator_ID_Signature(2),
Message_Set_Signature(3),
Network_Remote_ID(4),
Specific_Authentication_Method(5),
Private_Use_0xA(0xA),
Private_Use_0xB(0xB),
Private_Use_0xC(0xC),
......@@ -83,6 +84,7 @@ public class AuthenticationData extends MessageData {
case 2: this.authType = AuthTypeEnum.Operator_ID_Signature; break;
case 3: this.authType = AuthTypeEnum.Message_Set_Signature; break;
case 4: this.authType = AuthTypeEnum.Network_Remote_ID; break;
case 5: this.authType = AuthTypeEnum.Specific_Authentication_Method; break;
case 0xA: this.authType = AuthTypeEnum.Private_Use_0xA; break;
case 0xB: this.authType = AuthTypeEnum.Private_Use_0xB; break;
case 0xC: this.authType = AuthTypeEnum.Private_Use_0xC; break;
......@@ -103,7 +105,7 @@ public class AuthenticationData extends MessageData {
}
private int getMaxAuthPages(){
if(this.authIDType == Identification.IdTypeEnum.DRIP_ID.getValue())
if(this.authIDType == Identification.IdTypeEnum.Specific_Session_ID.getValue())
return Constants.MAX_DRIP_AUTH_DATA_PAGES;
return Constants.MAX_AUTH_DATA_PAGES;
......@@ -135,7 +137,7 @@ public class AuthenticationData extends MessageData {
}
private int getMaxAuthData(){
if(this.authIDType == Identification.IdTypeEnum.DRIP_ID.getValue())
if(this.authIDType == Identification.IdTypeEnum.Specific_Session_ID.getValue())
return Constants.MAX_DRIP_AUTH_DATA;
return Constants.MAX_AUTH_DATA;
}
......@@ -155,7 +157,7 @@ public class AuthenticationData extends MessageData {
public String getAuthenticationDataAsString() {
StringBuilder sb = new StringBuilder();
if(aircraft.identification.getValue().getIdType() == Identification.IdTypeEnum.DRIP_ID) {
if(aircraft.identification.getValue().getIdType() == Identification.IdTypeEnum.Specific_Session_ID) {
if (this.isValidated){
sb.append("Valid");
}else {
......
......@@ -66,7 +66,7 @@ public class Identification extends MessageData {
Serial_Number(1),//1
CAA_Registration_ID(2),//2
UTM_Assigned_ID(3),//3
DRIP_ID(4);//4
Specific_Session_ID(4);//4
int value;
......@@ -115,14 +115,14 @@ public class Identification extends MessageData {
case 1: this.idType = IdTypeEnum.Serial_Number; break;
case 2: this.idType = IdTypeEnum.CAA_Registration_ID; break;
case 3: this.idType = IdTypeEnum.UTM_Assigned_ID; break;
case 4: this.idType = IdTypeEnum.DRIP_ID;break;
case 4: this.idType = IdTypeEnum.Specific_Session_ID;break;
default: this.idType = IdTypeEnum.None; break;
}
}
public byte[] getUasId() { return uasId; }
public String getUasIdAsString() {
if(this.idType == IdTypeEnum.DRIP_ID){
if(this.idType == IdTypeEnum.Specific_Session_ID){
return Hex.toHexString(uasId).replaceFirst("0x", "");
}
return new String(uasId);
......
......@@ -538,7 +538,7 @@ public class OpenDroneIdParser {
int type = byteBuffer.get();
int idType = (type & 0xF0) >> 4;
int uaType = type & 0x0F;
if (idType == Identification.IdTypeEnum.DRIP_ID.getValue()) {
if (idType == Identification.IdTypeEnum.Specific_Session_ID.getValue()) {
basicId = new BasicId(Constants.MAX_DRIP_ID_BYTE_SIZE);
basicId.idType = idType;
basicId.uaType = uaType;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment