Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NumberPad
- - (void)viewDidLoad {
- [super viewDidLoad];
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSString *ip = [defaults stringForKey:@"ip_preference"];
- NSLog(ip);
- mpsIP.text = ip;
- }
- - (void) onRcvTcpBucketInfoReq:(NSNotification *)noti
- {
- NSLog(@"onRcvTcpBucketInfoReq(noti) : ");
- BucketInfo* bucket = (BucketInfo*) [[noti userInfo] objectForKey:COMMAND_DATA];
- NSLog(@"# BucketInfo : %@", bucket);
- // 중복 체크
- for (BucketInfo* b in self.bucketList) {
- if (b.seq == bucket.seq) {
- OnSndTcpBucketInfoRsp(bucket.seq);
- return;
- }
- }
- //[self.bucketList
- ////////////////////////////////////////////////////////////////////////////////////////////////
- // Coded date : 2010-11-04
- // Author : Suemirr
- ////////////////////////////////////////////////////////////////////////////////////////////////
- int nIdx = 0;
- BOOL bInsert = FALSE;
- for (BucketInfo* b in self.bucketList) {
- if(b.nSecTime > bucket.nSecTime)
- {
- [self.bucketList insertObject:bucket atIndex:nIdx];
- bInsert = TRUE;
- break;
- }
- nIdx++;
- }
- if(bInsert == FALSE)
- {
- [self.bucketList addObject:bucket];
- }
- //
- ////////////////////////////////////////////////////////////////////////////////////////////////
- // [self.bucketList addObject:bucket];
- isRcvSyncRsp = YES;
- int count = [pickingInfoBuffer count] - 1;
- for (int i = count; i >= 0; i--) {
- PickingInfo *p = [pickingInfoBuffer objectAtIndex:i];
- if (bucket.seq == p.seq) {
- bucket.pickingTotal++;
- if (p.isFront) {
- [bucket.frontPickingInfoList addObject:p];
- } else {
- [bucket.backPickingInfoList addObject:p];
- }
- [pickingInfoBuffer removeObjectAtIndex:i];
- }
- }
- [self performSelectorOnMainThread:@selector(updateBucket) withObject:nil waitUntilDone:YES];
- //[self updateBucket];
- OnSndTcpBucketInfoRsp(bucket.seq);
- }
Add Comment
Please, Sign In to add comment