Advertisement
Guest User

Untitled

a guest
Mar 31st, 2016
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. ATCommandData atData = new ATCommandData("AT", 0);
  2. ATCommandData atData1 = new ATCommandData("ATI", 0);
  3. ATCommandData atData2 = new ATCommandData("AT^SCFG?", 0);
  4. ATCommandData[] joinedATCommands = {atData,atData1};
  5. ATCommandData[] singleATCommand = {atData2};
  6.  
  7. ATCommandIssuer atci = new ATCommandIssuer(joinedATCommands);
  8. atci.exectute(new CallbackATCommand()
  9. {
  10. public void onSuccess(String response)
  11. {
  12. debugLogger.printSystemOut("JOINED AT SUCCESS: " + response);
  13. }
  14.  
  15. public void onFailure(String response)
  16. {
  17. debugLogger.printSystemOut("JOINED AT FAILURE: " + response);
  18. }
  19.  
  20. public void onError(String response)
  21. {
  22. debugLogger.printSystemOut("JOINED AT ERROR: " + response);
  23. }
  24. });
  25. Thread.sleep(500);
  26. ATCommandIssuer atci2 = new ATCommandIssuer(singleATCommand);
  27. atci2.exectute(new CallbackATCommand()
  28. {
  29. public void onSuccess(String response)
  30. {
  31. debugLogger.printSystemOut("SINGLE AT SUCCESS: " + response);
  32. }
  33.  
  34. public void onFailure(String response)
  35. {
  36. debugLogger.printSystemOut("SINGLE AT FAILURE: " + response);
  37. }
  38.  
  39. public void onError(String response)
  40. {
  41. debugLogger.printSystemOut("SINGLE AT ERROR: " + response);
  42. }
  43. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement