From f0602812cfdffced6284a1525daa7ff5c2d28bd2 Mon Sep 17 00:00:00 2001 From: Apostolof Date: Fri, 29 Dec 2017 13:10:43 +0200 Subject: [PATCH] Init --- .classpath | 7 ++ .project | 17 ++++ bin/ACK.class | Bin 0 -> 5929 bytes bin/Camera.class | Bin 0 -> 2576 bytes bin/ComputerNetworks.class | Bin 0 -> 1671 bytes bin/GPS.class | Bin 0 -> 6657 bytes bin/Ping.class | Bin 0 -> 2480 bytes bin/Utils.class | Bin 0 -> 1323 bytes libs/ithakimodem.jar | Bin 0 -> 10774 bytes src/ACK.java | 144 +++++++++++++++++++++++++++++++++ src/Camera.java | 66 +++++++++++++++ src/ComputerNetworks.java | 37 +++++++++ src/GPS.java | 162 +++++++++++++++++++++++++++++++++++++ src/Ping.java | 56 +++++++++++++ src/Utils.java | 32 ++++++++ 15 files changed, 521 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 bin/ACK.class create mode 100644 bin/Camera.class create mode 100644 bin/ComputerNetworks.class create mode 100644 bin/GPS.class create mode 100644 bin/Ping.class create mode 100644 bin/Utils.class create mode 100644 libs/ithakimodem.jar create mode 100644 src/ACK.java create mode 100644 src/Camera.java create mode 100644 src/ComputerNetworks.java create mode 100644 src/GPS.java create mode 100644 src/Ping.java create mode 100644 src/Utils.java diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..e51bb91 --- /dev/null +++ b/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..75d2c48 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + finalCode + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/bin/ACK.class b/bin/ACK.class new file mode 100644 index 0000000000000000000000000000000000000000..4aad70979f3ea33920a7ebcd19bef014ecd6caf8 GIT binary patch literal 5929 zcmcIod3+S*8GgQ*O=fm831O2>m=ItQh)E=g5D5?hm_#B$jzA(2Qj}pckPVyNWp{$m z1COFoZR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-Z%k0vfL z&!JSqZ-prQHwI?^3v=@;U%(RKuFi9CmQ631vRpw~AyNSI@Jrx4+lHTBr?X`$3)#rT j!vS63=h~OcmeW)!Eq{5Mq+tpQUy__b7GfEH718t`*F4o` literal 0 HcmV?d00001 diff --git a/bin/Camera.class b/bin/Camera.class new file mode 100644 index 0000000000000000000000000000000000000000..86050a5088c01629cc152d6d35b068bb236789d7 GIT binary patch literal 2576 zcmZ`)TXPgu5dO~IX0r?d0vlKmvIxi~5CVuHB*-m-tb_#FkeI{^lg(i>usgfV%t8W+ zpml;tn+#ebmUcV+?!Bv$Rt={bG6`|Gc}&;0T4&D#K; z!*?120+Dv3AZ_M!*Wh89bp^tvRVs6x+u`ZTu9kxfw&*ZEHj)zvFss9~WM{cBDD7@zFfRpaI*M5% z-(%ROdiOSC2x5_PA7u{iu<0z zqa~TN<!tv?gPC1}P0IsrA@lj+5+k)T4onmy|2|9#76I2U#$!Tw8sQ;$gLp zMyw%1OOCiIJArwrdY_8Pr=wUaa3EbUax!_y%u9<|Bva<0q~X0LkDKmr(jAsbM=3n5 zktf?jqe(epI}@HV{Tmx?T{0mD6CJimSd~ zV8%Ezs$Wz^COU6CRr-C1S;Hpw6Tuos%mU9Bn)a$^3@um`glIXfq~~>P!B$#1(#@2l z9AY6;X+>BIw(Hn|c7Ygm-DW|0wNu*uD0Z^EzH4>zMIF15rfIPxRWDAHk22aLz&h+j zmxfMO>;R|2(XkINGqHkkMDF*?F0d)pF$H(q)MTeAUJMx=(9r$(w0LcxqX)eLn(6E; zl-yBo_6Vwvujc& zbV$%gl~W#cJO~1{sdRc8*cyff7Ch|kUF^E9vioR^W60sK8nYwH!BiglRlPFcePE$T z9B#3F*s!9Cf8=TOv>PL2umKxYWFf`4ftmBv(;_#t-*%?+lBRWRC zoov47$QVxIEe&r9ES?Oqv*_+BmaU9kpM#t7IX35{pKb-uaDKWI<-C6!?tuvMa!XC%yA9duZ4hM zXGWzpQ-UX}SyoL+RCsQojS;dRu#J^$Js7ml!Wh3*$#3a z(ftE>3X45AOCA{)7$CsC71vN#v#g@l+6q?fQLjypUOO6A-N3ru3FiyF9CW(jXAjkw z&u`ok)L=R0dI4+cbQWs)A#SGgCCqdqB{HOLRj$lA(C2Xg{C*29eb>?2*;vz7!RE#} z!9Oe5*4tR~LIt~eYhG#%H8$KpM{6h%x{n!&PzC!hBODw{glb-?puagx;q?j*h7UGJ z;^DyesES7dKlmr&;drEi?A}|*^{onChuIohT|vGzoCx3kHQE{pHfvWfClQHjiEv!o zaH0FGCMZX4|M=jqL?{snQmmk)g1YK){0idAxPlYGF<*E)IM!IfJH4SX=A6YCe&!Ua z^#;c&=vD6o82}|!jB0j3Ef%p5OV|~4NFhmLUlDea>s%TJ+&Cb(Ej zpX+c2>+vbqi{$VpT3tai<7~uLj%Ed$7_k*M(S|$NjJw#1`}C+f<{YDv=kaPN=`1Y; z{Y$(@DL`bu;eC8Syi55t`H*`d+AhOK_?Z2=huA-%6d{`JMDQ84cUeRJ|J(Q$yx{vCwFT&{kO8pF}2GK5x}?q0j*P1M*si- literal 0 HcmV?d00001 diff --git a/bin/ComputerNetworks.class b/bin/ComputerNetworks.class new file mode 100644 index 0000000000000000000000000000000000000000..7f15992f28ab38da85699081c1c51b4b6824da97 GIT binary patch literal 1671 zcmZuxTTc~N6#jOiVANnKuOHApv=KzYDN%o$-ZhNiueQW>o-yeSgxQKNVH3pg{ zqEfk%s(4nV_oH|tF;Pe9y4;lgfecssuP?1DFEx<6Ed>hs*;0tbQq}7LEEY!{iy#+$a)!7 z$+s;5D3K@ll1ncouAq$sGi6+Z|MWW(O6^neCvI6x()K95Yc(SBoDg2ULRpLI4MHFW{?-eSJ zdCJp9yA1EUOwAQVOtsqg%CD9atskMj=$9&iq-y-;4dF$lQYG{~sgn|U8Q;@p12mi5 z@>7vlTnqMmB)qjKN>r~%x64W>Cc#X(h%iG}_+fThilw)q(nM#dwPeq-)|F+fLJAU< z^w~CE$9WUy476m(vH#Dt%)uLY(?ES$cad$~Mzo}3}DE_;8D6{9CI*?5fWY9tH^*HJ(5m!48{s~ zEWBgD7_{*oMoqlWuo_nfeaKn3M1~L^3!D>U$i~O`#KbsbPGq<`n9!q=tDV-C{0KGErhlk!7)3sRV(DRx;?4?J$*FeHyGU9o*HJm>DKPsJr~N zgKzXj^N@ChGHV)7zfjR87%|Hiz$nmk>&kY z!!AaZ*i)B%{jRjV_;mDXYM~o!1z$FxhJSpMxSBlmb2qrx_dJ31Tc)M z;C`H^2An`6C3H4sX`zGu@+X>ZKZg4RozstT%00V_ZoR+7{lYE^Gw$2HyXb!i$Gxb3 z9-!fOyt}jauRC@i|KL#m(azrA?xzRx%ZKvMcJ_XCrw`<_hw{0dy&v7rtMV@QR#l$c z!3mwg?OiPH>}@iMuXJ&>(8XPa%QeU1^yB5?6jy;(455uLe>?RZm_a9&a1sh#_?8ym z;WWPIEB6D=;wLoY5zgUfoX;B6gF4*=NP2*hhw!k>772POtgz#c*zxM$DlIy2>?vAI WG(E)`69e_l+1F~*WsT|@`2PbLn3fs< literal 0 HcmV?d00001 diff --git a/bin/GPS.class b/bin/GPS.class new file mode 100644 index 0000000000000000000000000000000000000000..07d076b9199d3f7743ab6a3fb04f706f57497451 GIT binary patch literal 6657 zcmbVQ3wT^db^ed`ad%f&vb>HQuj3?ZBRji#+K%JcD?hLm*;Xt|P9)29WJ0c`D{14^ z?y`F~wo*!C9s$xOBm_bn)8^5FcqG(u%38*Wp-D+v%A+k5N_n)jl+w~bDSgloQ2&{| zE3F=ce*NO;-nnyT=AU!^|D2iq+%GQ1KZo9$8iq#)cqYuo4KlIhWQK}|;{op-FXGhn3(b^t-a z($>bEv7-&Gjq#)DzW&~Wt&NM!*;hE0cLFd4RSg>im(O4GpyfDrE-i?ZRxLQmR9j8~ zX>+@{_;PntM<$aSPNprV1T}!Ag67tyo%;XS;QE%WZ)l3Q#`q=P+|#^XzqGpF`Kh&O zv8h~ymkFvHHZ(VEY;L%=xnYxF#ezj=u=TZU#hP>d6og=ni5k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610d70889e2339c GIT binary patch literal 2480 zcmaJ?Yf}?f7=8{(*koNrqM(Rkta24WTNMRt6$M4P)o>|T+b-dN3(0QWY!G_2t!-^< z@Ap<`dYO*X8Nbxd1gARv0sY(`(f`nC?Q=FkQ5ZiYd(L^^^S~k& zC=v(`SoV~LpupN`bJlE5n)Xz4|M;{_cmg5IPG|XD*W=5wo|SBlCrsOxZks^3J(09* z%X?BFP**=pTSuJ}9fJ$XPObp&RD?=|miWh8L@ShFVH}W{7XeJp=V!LD5gbR5Dlm9b8N+7-fC?phIe9CUR;V9R0-x~!z^ zbG$AmYfp5}C1l#O9NWN2RR|@1HsT)R9CXcu)X}4^_X_M-ygp=Svgx$rdUB%EW}+GA zJu4de*#?$(&YZDQQNn125tw zvS_Bs8EN0O)YxLrEepO7CFfBRuP76*3T$Rd9;tZI!0Ud~dQRT3D&98@Tv9!+`Bj#* zRUY3q@D47M_C(UjFhNYln9_YuowFj>cr1fsGHK2qab0ts6Z1^BKqTXtuAfALJ4uVg zqw0m=F8EEfY*^)ci?dBoX=^@q4x|;Efm${9G#*v&R1Eobu3n4fr9o#F>)e%@v|}r9 ztNqUEHPikC)^LTD9(S^CLaI0jOU>UVRVEy}av zgCd?a-o)1E_8h8jqCAJ4r_{E2al5BIe>&1oc?}NML{DI*vtO zXw`3FyrUxAa0`?Ex+T>=jr$RMaUJ`8FX=pK1!_rO zf!ZK`#{0O!7>n@}KEQ{JErRdy5mzBbbPXTl6Q)k3?^9Y1)3;iE&Q%L%)ED@YtJ8c$ zzGA8(jHeY}^QYq*CaD&oy98dW!4Vq14F)wfI9JC{Xy^(5iy94m;vXDlZoi{?5w89Z DQc^*J literal 0 HcmV?d00001 diff --git a/bin/Utils.class b/bin/Utils.class new file mode 100644 index 0000000000000000000000000000000000000000..c0b8f7f97120a9ea72296661703d4ed55e723574 GIT binary patch literal 1323 zcmZuw%Tg0T6g{1pI3Y{~1E^>OpD+O-J`o5YCW4|Ns329!#vwE~l9!VS;?8ey>B^m3 z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M$ z&iZ^(>Z)MJ9(i~gy(!#4?7n`6S-YmOTcG^yPC>%OF5c7bIg7pe`7~~*jRy6;eh;U7#P%tw1wsoN7RR*7(_$B3pdw2G95B}N!wj39MH z*TEF_Z(i;?hWrz_S{V9A-Jd|TKX3U1XE4@t2C)?40#9K)g{9JZz78LbkEG4u&|>b`>{SDM>YTh>B6hAX)czolZnLbZ66 zmsIDlLh(pzM(E4=L_+wx`>xr7jq1ks3j`E%heSe$(1ZC)hbn`)~RYHXIC<@ zx{BkgFMIa0TH{}!fp%_J`*@H@%I&IhmGGiZrnb;` zi^S%i4?hh`o&7Y?`HFF->q6f#N(cEn{^pe|vt4t(YRqN6(072kyJlX)4WE0}o7;1t z?*g5k!h6@8o;u&2{Wi(DEuKql?j`dKwcYe+x#MuY7So>^cJJ_ro#X1t`U0s+dHW+J C$KfXc literal 0 HcmV?d00001 diff --git a/src/ACK.java b/src/ACK.java new file mode 100644 index 0000000..9f8f28d --- /dev/null +++ b/src/ACK.java @@ -0,0 +1,144 @@ +import java.io.FileNotFoundException; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.Scanner; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import ithakimodem.Modem; + +public class ACK { + private final static String regex = ".*PSTART.*<(.*)> ([0-9]*) PSTOP."; + private final static String subst = "$1,$2"; + private final static Pattern pattern = Pattern.compile(regex, Pattern.DOTALL); + + private static final Scanner input = new Scanner(System.in); + + public static void ack() { + System.out.print("Type request code for ack: "); + String ackRequestCode = input.nextLine(); + System.out.print("Type request code for nack: "); + String nackRequestCode = input.nextLine(); + System.out.print("Time to run: "); + int timeToRun = input.nextInt(); + input.nextLine(); + + getACK(ackRequestCode, nackRequestCode, timeToRun); + } + + private static int getACK(String ackRequestCode, String nackRequestCode, int numberOfSecondsToRun) { + long endTime = 0; + boolean lastCallHadErrors = false; + int packageNumber = 0, errorFreePackages = 0, errorPackages = 0, BER = 0; + ArrayList packageBytesWithErrors = new ArrayList(); + ArrayList packageResponseTime = new ArrayList(); + + PrintWriter writer = null; + try { + writer = new PrintWriter("ARQ_2.txt", "UTF-8"); + } catch (FileNotFoundException e) { + e.printStackTrace(); + return -1; + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + return -1; + } + + writer.println("[0] #No, [1] HasError, [2] Package, [3] Response time\n\n[0]\t[1]\t\t\t\t\t\t\t\t[2]\t\t\t\t\t\t\t\t[3]"); + + Modem modem = new Modem(); + modem.setSpeed(Utils.modemSpeed); + modem.setTimeout(Utils.modemTimeout); + modem.open(Utils.modemOpen); + + endTime = System.currentTimeMillis() + numberOfSecondsToRun * 1000; + while(System.currentTimeMillis() < endTime) { + long packageStartTime = 0, packageEndTime = 0; + String response = ""; + + packageStartTime = System.currentTimeMillis(); + if (!lastCallHadErrors) { + response = Utils.makeRequest(modem, ackRequestCode); + packageEndTime = System.currentTimeMillis(); + packageResponseTime.add((int)(packageEndTime - packageStartTime - Utils.modemTimeout)); + } else { + response = Utils.makeRequest(modem, nackRequestCode); + packageEndTime = System.currentTimeMillis(); + packageResponseTime.add((int)(packageEndTime - packageStartTime - Utils.modemTimeout)); + } + + Matcher matcher = pattern.matcher(response); + String[] packageAndFCS = (matcher.replaceAll(subst)).split(","); + if (packageAndFCS.length != 2 || packageAndFCS[0] == null || packageAndFCS[0].isEmpty() + || packageAndFCS[1] == null || packageAndFCS[1].isEmpty()) { + System.out.println("Malformed response: " + response); + continue; + } + byte[] packageBytes = packageAndFCS[0].getBytes(); + byte xor = packageBytes[0]; + for (int i=1; i\t"); + writer.print(packageBytes[0]); + for (int i=1; i " + (errorFreePackages / allPackages * 100)); + System.out.println("Error packages = " + errorPackages + " --> " + (errorPackages / allPackages * 100)); + System.out.println("Error bits = " + BER); + System.out.println("BER = " + ((float) BER)/((float)((allPackages) * 16 * 8))); + + return 1; + } +} diff --git a/src/Camera.java b/src/Camera.java new file mode 100644 index 0000000..227c91c --- /dev/null +++ b/src/Camera.java @@ -0,0 +1,66 @@ +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Scanner; + +import ithakimodem.Modem; + +public class Camera { + private static final Scanner input = new Scanner(System.in); + + public static void camera() { + System.out.print("Type request code: "); + String requestCode = input.nextLine(); + System.out.print("Image filename (if a file with the same name already exists" + + " it will be overwritten): "); + String filename = input.nextLine(); + + getImage(requestCode, filename); + } + + private static boolean getImage(String requestCode, String imageFilaname) { + String imageString; + + Modem modem = new Modem(); + modem.setSpeed(Utils.modemSpeed); + modem.setTimeout(Utils.modemTimeout); + modem.open(Utils.modemOpen); + + { + String response = ""; + response = Utils.makeRequest(modem, requestCode); + if (response == null || response.isEmpty()) { + return false; + } + int startIndex = response.indexOf("" + (char) 255 + (char) 216), + endIndex = response.lastIndexOf("" + (char) 255 + (char) 217) + 2; + if (startIndex == -1 || endIndex == -1) { + return false; + } + imageString = response.substring(startIndex, endIndex); + } + + FileOutputStream fileOutputStream; + try { + fileOutputStream = new FileOutputStream(imageFilaname, false); + + char imageCharArray[] = imageString.toCharArray(); + byte imageByteArray[] = new byte[imageCharArray.length]; + for (int i=0; i coordinates = getCoordinates(requestCode, requestFlags, numberOfCoordinates); + + if (coordinates == null || coordinates.isEmpty()) { + System.out.println("Came with an empty List!"); + return; + } + + input.nextLine(); //Clear input buffer + System.out.print("Should try to fetch the image? (y/n): "); + String fetchImage = input.nextLine(); + while(true) { + if ("y".equals(fetchImage)) { + System.out.print("Image filename (if a file with the same name already exists" + + " it will be overwritten): "); + String filename = input.nextLine(); + + getImage(requestCode, coordinates, filename); + + return; + } else if ("n".equals(fetchImage)) { + return; + } + System.out.print("Input malformed. Try again: "); + fetchImage = input.nextLine(); + } + } + + private static List getCoordinates(String requestCode, String requestFlag, int coordinatesToExtract) { + List coordinates, returnList = new ArrayList(); + String response = ""; + + PrintWriter writer = null; + try { + writer = new PrintWriter("gps.txt", "UTF-8"); + } catch (FileNotFoundException e) { + e.printStackTrace(); + return null; + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + return null; + } + + Modem modem = new Modem(); + modem.setSpeed(Utils.modemSpeed); + modem.setTimeout(Utils.modemTimeout); + modem.open(Utils.modemOpen); + + response = Utils.makeRequest(modem, requestCode + requestFlag); + modem.close(); + + if (response == null || response.isEmpty()) { + writer.close(); + return null; + } + + final Matcher extractGPGGALineMatcher = extractGPGGALinePattern.matcher(response); + coordinates = new ArrayList(Arrays.asList(extractGPGGALineMatcher.replaceAll(extractGPGGALineSubst).split("\n"))); + for (String coordinate: coordinates) { + writer.println(coordinate); + } + writer.close(); + writer.println(response); + + for (int i=0; i coordinates, String imageFilename) { + String imageString; + + for (String coordinate : coordinates) { + requestCode += "T=" + coordinate; + } + + Modem modem = new Modem(); + modem.setSpeed(Utils.modemSpeed); + modem.setTimeout(Utils.modemTimeout); + modem.open(Utils.modemOpen); + + { + String response = ""; + response = Utils.makeRequest(modem, requestCode); + if (response == null || response.isEmpty()) { + return false; + } + int startIndex = response.indexOf("" + (char) 255 + (char) 216), + endIndex = response.lastIndexOf("" + (char) 255 + (char) 217) + 2; + if (startIndex == -1 || endIndex == -1) { + return false; + } + imageString = response.substring(startIndex, endIndex); + } + + FileOutputStream fileOutputStream; + try { + fileOutputStream = new FileOutputStream(imageFilename, false); + + char imageCharArray[] = imageString.toCharArray(); + byte imageByteArray[] = new byte[imageCharArray.length]; + for (int i=0; i