Guest User

Untitled

a guest
Aug 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. NumberPad
  2.  
  3. - (void)viewDidLoad {
  4. [super viewDidLoad];
  5.  
  6. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  7. NSString *ip = [defaults stringForKey:@"ip_preference"];
  8. NSLog(ip);
  9. mpsIP.text = ip;
  10. }
  11.  
  12.  
  13.  
  14.  
  15.  
  16. - (void) onRcvTcpBucketInfoReq:(NSNotification *)noti
  17. {
  18. NSLog(@"onRcvTcpBucketInfoReq(noti) : ");
  19. BucketInfo* bucket = (BucketInfo*) [[noti userInfo] objectForKey:COMMAND_DATA];
  20. NSLog(@"# BucketInfo : %@", bucket);
  21.  
  22. // 중복 체크
  23. for (BucketInfo* b in self.bucketList) {
  24. if (b.seq == bucket.seq) {
  25. OnSndTcpBucketInfoRsp(bucket.seq);
  26. return;
  27. }
  28. }
  29.  
  30.  
  31. //[self.bucketList
  32. ////////////////////////////////////////////////////////////////////////////////////////////////
  33. // Coded date : 2010-11-04
  34. // Author : Suemirr
  35. ////////////////////////////////////////////////////////////////////////////////////////////////
  36. int nIdx = 0;
  37. BOOL bInsert = FALSE;
  38. for (BucketInfo* b in self.bucketList) {
  39. if(b.nSecTime > bucket.nSecTime)
  40. {
  41. [self.bucketList insertObject:bucket atIndex:nIdx];
  42. bInsert = TRUE;
  43. break;
  44. }
  45.  
  46. nIdx++;
  47. }
  48.  
  49. if(bInsert == FALSE)
  50. {
  51. [self.bucketList addObject:bucket];
  52. }
  53. //
  54. ////////////////////////////////////////////////////////////////////////////////////////////////
  55.  
  56. // [self.bucketList addObject:bucket];
  57. isRcvSyncRsp = YES;
  58.  
  59. int count = [pickingInfoBuffer count] - 1;
  60. for (int i = count; i >= 0; i--) {
  61. PickingInfo *p = [pickingInfoBuffer objectAtIndex:i];
  62. if (bucket.seq == p.seq) {
  63. bucket.pickingTotal++;
  64.  
  65. if (p.isFront) {
  66. [bucket.frontPickingInfoList addObject:p];
  67. } else {
  68. [bucket.backPickingInfoList addObject:p];
  69. }
  70.  
  71. [pickingInfoBuffer removeObjectAtIndex:i];
  72. }
  73. }
  74.  
  75. [self performSelectorOnMainThread:@selector(updateBucket) withObject:nil waitUntilDone:YES];
  76.  
  77. //[self updateBucket];
  78.  
  79. OnSndTcpBucketInfoRsp(bucket.seq);
  80. }
Add Comment
Please, Sign In to add comment