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

Implement ETag #484

Merged
merged 3 commits into from
Aug 1, 2023
Merged

Implement ETag #484

merged 3 commits into from
Aug 1, 2023

Conversation

Danielius1922
Copy link
Member

No description provided.

@ocf-conformance-test-tool
Copy link

🎉 Thank you for your code contribution! To guarantee the change/addition is conformant to the OCF Specification, we would like to ask you to execute OCF Conformance Testing of your change ☝️ when your work is ready to be reviewed.


ℹ️ To verify your latest change (e30e3cc), label this PR with OCF Conformance Testing.

⚠️ Label is removed with every code change.

@Danielius1922 Danielius1922 force-pushed the adam/feature/etag branch 4 times, most recently from 8d4eedf to 6fe77bf Compare July 19, 2023 12:25
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag branch 2 times, most recently from 91404e9 to 03f5786 Compare July 19, 2023 16:07
@Danielius1922 Danielius1922 requested a review from jkralik July 20, 2023 09:55
@Danielius1922 Danielius1922 marked this pull request as ready for review July 20, 2023 09:55
api/oc_etag.c Outdated Show resolved Hide resolved
api/oc_etag_internal.h Outdated Show resolved Hide resolved
api/oc_etag.c Outdated Show resolved Hide resolved
api/oc_server_api.c Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
* move setter and getter functions to coap_options.h
* add tests
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag branch 2 times, most recently from c7a53e8 to 33e6217 Compare July 24, 2023 15:58
api/oc_ri.c Show resolved Hide resolved
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag branch 8 times, most recently from 357b4aa to 08e2fb8 Compare July 26, 2023 19:03
api/oc_ri.c Outdated Show resolved Hide resolved
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag branch 5 times, most recently from 161b338 to 243edd0 Compare July 27, 2023 10:53
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag branch 3 times, most recently from 6e56b6e to c3020b8 Compare July 27, 2023 14:01
api/oc_etag.c Outdated Show resolved Hide resolved
api/oc_etag.c Outdated Show resolved Hide resolved
api/oc_etag.c Outdated Show resolved Hide resolved
@jkralik jkralik added the OCF Conformance Testing OCF Conformance Testing required label Jul 29, 2023
@ocf-conformance-test-tool ocf-conformance-test-tool bot removed the OCF Conformance Testing OCF Conformance Testing required label Jul 31, 2023
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag branch 2 times, most recently from 19fec75 to 16a8bee Compare July 31, 2023 13:48
This commit introduces the Entity Tag (ETag) feature, enabling
resources to have their own ETag values. The ETag value of
a resource can be updated by calling either oc_resource_update_etag
or oc_notify_resource_changed, the latter also notifying observers
if the resource is observable.

If a resource supports POST or PUT requests, its ETag is
automatically updated upon a successful request.

The value of the ETag is based on the system time, using
oc_clock_time(). If OC_STORAGE is enabled, the current ETag can be
stored and loaded from storage. For more details on the public API,
refer to the etag.h header file.

In CoAP responses to GET requests addressed to a specific resource,
the ETag is included in CoAP options if the response code is
Content (2.05) or Valid (2.03). If a GET request contains an ETag
in CoAP options that matches the ETag of the addressed resource,
the response code will be Valid (2.03), and no data will be
included in the response.

These changes enhance the efficiency of resource handling in the
IoTivity-lite library.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 31, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 5 Security Hotspots
Code Smell A 9 Code Smells

91.4% 91.4% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@Danielius1922 Danielius1922 added the OCF Conformance Testing OCF Conformance Testing required label Jul 31, 2023
@Danielius1922 Danielius1922 merged commit 2a1116c into master Aug 1, 2023
@Danielius1922 Danielius1922 deleted the adam/feature/etag branch August 1, 2023 07:16
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
OCF Conformance Testing OCF Conformance Testing required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants