summaryrefslogtreecommitdiff
path: root/simulation.scm
diff options
context:
space:
mode:
Diffstat (limited to 'simulation.scm')
-rw-r--r--simulation.scm14
1 files changed, 0 insertions, 14 deletions
diff --git a/simulation.scm b/simulation.scm
index 9b74577..197f0d9 100644
--- a/simulation.scm
+++ b/simulation.scm
@@ -121,22 +121,11 @@
;; TODO: Unhardcode me
(define time-on-air 0.01)
- (define to-confirm (make-atomic-box #f))
- (define NbTrans 3)
- (define Cu 0)
- (define Cd 0)
-
- (define retransmissions NbTrans) ;; decrement in each transmission
(define (process-downlink! frame)
;; TODO
(ll "Device ~a got downlink frame ~a" id frame))
- #;(define (confirm frame-FCnt)
- (when (eq? frame-FCnt (atomic-box-compare-and-swap! to-confirm frame-FCnt #f))
- (spawn-fiber
- (lambda () "confirm confirmation frame"))))
-
(define (send-uplink-frame frame-number device-addr confirmed?)
(let* ((event-id id)
(frame (make-frame
@@ -144,8 +133,6 @@
id
'()
(if confirmed? 'confirmed-data 'unconfirmed-data))))
- (when confirmed?
- (atomic-box-compare-and-swap! to-confirm #f frame-number))
(put-message upstream-chn
(make-radio-event 'uplink-start event-id channel frame))
(sleep time-on-air)
@@ -204,7 +191,6 @@
(define current-frame 0)
(forever
- ;; TODO check to-confirm
(ll "Device ~a waiting for data" id)
(sleep (rand-time)) ;; wait for more data