anchor.diff:  				;; ԶݣLogger
   				;(if (> (length read_data) 0)
   					(assert "data:" (hextostring read_data ) " | " read_data "\n")
  -					(hanle_serial_data  read_data)
  +					(handle_serial_data  read_data)
   				;)
   				
   			)
  
positive.code: (set 'talk (share))     (share talk 0)
  (set 'content (share))  (share content "")
  (setq going (share))  (share going nil) ;; һshare goingʶʱǷ˹ݽ룬Ҫܿ˹һ
  
  (set 'sid (semaphore))
  (semaphore sid 1);;Ĭϲ0 
  
negative.code: 
  )
  
  (define (base_plot) ;; ԣһֱͣĻĿǰݣݿ
  	(setq sleep_time 0)
  
  	(new Tree 'plugin_data)
  	
  	(while 1
  		
  		(dolist (u (share base_in_mem) 
  				(if (find "NODES" u)
  						(setq nlst (nth (- (length u) 1) u))
  						(find "PANID" u)
  						(setq panid (nth (- (length u) 1) u))
  						(find "PANID2" u)
  						(setq panid2 (nth (- (length u) 1) u))
  				)
  				)
  		)
  		(if (not (nil? panid))
  			(begin
  				(assert panid "\n")
  				(if (= (panid "FFFE"))
  					;;to be a coordinator
  				)
  			)
  		)
  		(if (and (not (nil? nlst)) (> (length nlst) 0))
  			(begin
  				(dolist (d nlst (if (and (find d "shortaddress") (> (length d) 1)) (setq dst_addr (nth 1 d))))
  				)
  				(if (not (nil? dst_addr))
  				)				
  			)
  		)
  		(sleep 1000)
  		;;;
  	(setq rules_dir "rules")
  	(if (directory? rules_dir) ;; mean rules directory exsited
  		(begin
  			(setq lsp_lst (directory rules_dir "\\.arg") );; rules,ʵǱ׼ newlisp ļ
  			(dolist (x lsp_lst)
  				(do_plot (string rules_dir "/" x)) ;; ȷ˳,ÿԾһ 
  			)
  		)
  		;;rulesͲloadȥ
  	)		
  		(write_string_to_serial "50") ;; ping 
  		(sleep 300)
  	)
  )
  
  (signal SIGINT ctrlC-handler)
  
  (setq cpid3 (spawn 'base_p (base_plot)))
  
  
  