Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: ContikiClock provides clock drift simulate and control #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alexrayne
Copy link
Contributor

Here provided simulation and control for rTimer ContikiClock drift.

  • control allow set exact value of drift in [ppm] or random value in range

  • provided running show for simulation and mote rTime, and drifts

  • drift setup are saves in csc project

  • drift can changes during simulation, but tyhere is no handling sideeffects of change - scheduled events may miss their time.

…e clarify

* temporary need for compatibily with other patched.
… for specified [ppm]

+     rtcTime() - now rTimer value not equals to simulation time, but takes to acount clockDrift
+     setClockDrift - provide random clockDrift from specified range
+     provided UI - there shows time and drifts, and allow setup drift value.
…ionTime vs

        rTime values decimated by clock drift.

        if drift go rtc faster, then appears jumps in rtc sequence, to realise speedup rtc sv simulation time.
        if mote waits value exact in jumped gap, then it's firmware may loose awake.
        To prevent it, do correct simRtimerNextExpirationTime, so that go after jumped gap, if need.
@xthuan
Copy link

xthuan commented Feb 14, 2021

Hi Alex,

Many thanks for your work on the clock drift simulation!

I'm wondering whether we could control the simulation of the clock drift for skyMote in Cooja, i.e., setting ppm bound as you did here.

Best wishes,
Xintao

@alexrayne
Copy link
Contributor Author

alexrayne commented Feb 14, 2021

Looks you should check PR#50 - it is about MspMote clock drift.

since MspMote uses it's own modules, completely independt from ContikiMote one, therefore this PR not affects MspMote.
it`s totaly separate simulator architectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants