Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Adding a function to register a callback function for retrieving a global timestamp #55

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

aentinger
Copy link
Contributor

This is necessary because right now we are relying on the RTC within the SAMD MCU which is instantiated (RTCZero) within the ArduinoIoTCloud library and reference within ArduinoCloudThing via extern devlaration. Due to the extern binding this is a very brittle dependency which can be easily destroyed, it is therefore better to explicitly register a function which provides the time (this can be serviced by the TimeService class available in ArduinoIoTCloud.

Successfully tested on PROD with

  • MKR 1000 ✔️
  • MKR WiFi 1010 ✔️
  • MKR GSM 1400 ✔️
  • ESP8266 ✔️

@TravisBuddy

This comment has been minimized.

@aentinger aentinger force-pushed the retrieve-timestamp-via-callback-method branch from 990c261 to 6433958 Compare February 25, 2020 07:25
@TravisBuddy

This comment has been minimized.

@aentinger aentinger force-pushed the retrieve-timestamp-via-callback-method branch from 6433958 to fc6c29f Compare February 25, 2020 07:32
@codecov-io
Copy link

codecov-io commented Feb 25, 2020

Codecov Report

Merging #55 into master will decrease coverage by 0.31%.
The diff coverage is 62.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
- Coverage   95.73%   95.41%   -0.32%     
==========================================
  Files          24       24              
  Lines         867      872       +5     
==========================================
+ Hits          830      832       +2     
- Misses         37       40       +3
Impacted Files Coverage Δ
src/ArduinoCloudThing.h 100% <ø> (ø) ⬆️
src/ArduinoCloudProperty.h 100% <ø> (ø) ⬆️
src/ArduinoCloudThing.cpp 95.98% <33.33%> (-0.65%) ⬇️
src/ArduinoCloudProperty.cpp 93.75% <80%> (-0.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5feaf4...fc6c29f. Read the comment docs.

…obal timestamp.

This is necessary because right now we are relying on the RTC within the SAMD MCU which is instantiated (RTCZero) within the ArduinoIoTCloud library and reference within ArduinoCloudThing via extern devlaration. Due to the extern binding this is a very brittle dependency which can be easily destroyed, it is therefore better to explicitly register a function which provides the time (this can be serviced by the TimeService class available in ArduinoIoTCloud
@aentinger aentinger force-pushed the retrieve-timestamp-via-callback-method branch from fc6c29f to 85078a0 Compare February 25, 2020 12:18
@FWeinb
Copy link

FWeinb commented Feb 25, 2020

Codecov Report

Merging #55 into master will decrease coverage by 0.31%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
- Coverage   95.73%   95.41%   -0.32%     
==========================================
  Files          24       24              
  Lines         867      872       +5     
==========================================
+ Hits          830      832       +2     
- Misses         37       40       +3     

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5feaf4...85078a0. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #55 into master will decrease coverage by 0.31%.
The diff coverage is 62.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
- Coverage   95.73%   95.41%   -0.32%     
==========================================
  Files          24       24              
  Lines         867      872       +5     
==========================================
+ Hits          830      832       +2     
- Misses         37       40       +3
Impacted Files Coverage Δ
src/ArduinoCloudProperty.h 100% <ø> (ø) ⬆️
src/ArduinoCloudThing.h 100% <ø> (ø) ⬆️
src/ArduinoCloudThing.cpp 95.98% <33.33%> (-0.65%) ⬇️
src/ArduinoCloudProperty.cpp 93.75% <80%> (-0.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5feaf4...85078a0. Read the comment docs.

@aentinger aentinger merged commit 9189d69 into master Feb 25, 2020
@aentinger aentinger deleted the retrieve-timestamp-via-callback-method branch February 25, 2020 12:52
aentinger added a commit that referenced this pull request Feb 27, 2020
…poch type timestamp

In #55 the possibility for retrieving a epoch type timestamp via a registered callback function has been introduced, the changes in arduino-libraries/ArduinoIoTCloud#93 register such a function which allows us to to remove the hidden dependency to RTCZero altogether
aentinger added a commit that referenced this pull request Feb 27, 2020
…poch type timestamp

In #55 the possibility for retrieving a epoch type timestamp via a registered callback function has been introduced, the changes in arduino-libraries/ArduinoIoTCloud#93 register such a function which allows us to to remove the hidden dependency to RTCZero altogether
aentinger added a commit that referenced this pull request Mar 9, 2020
…poch type timestamp

In #55 the possibility for retrieving a epoch type timestamp via a registered callback function has been introduced, the changes in arduino-libraries/ArduinoIoTCloud#93 register such a function which allows us to to remove the hidden dependency to RTCZero altogether
aentinger added a commit to arduino-libraries/ArduinoIoTCloud that referenced this pull request Jun 3, 2020
…poch type timestamp

In arduino-libraries/ArduinoCloudThing#55 the possibility for retrieving a epoch type timestamp via a registered callback function has been introduced, the changes in #93 register such a function which allows us to to remove the hidden dependency to RTCZero altogether
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants