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

add draft for dke:ping command #197

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
2 changes: 1 addition & 1 deletion modules/ROOT/pages/ar2/testing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Additionally, the public key used for signing the authorize redirect needs to be
* Onboard the application:
** If your application provide an easy way to onboard an endpoint this should be the preferred way
** Onboard manually using the authorize page:
** Go to: http://app.qa.agrirouter.farm/en/application/{YOUR_APP_ID}/authorize?response_type=onboard&redirect_uri={YOUR_REDIRECT_URL}
** Go to: http://app.qa.agrirouter.farm/en/application/\{YOUR_APP_ID\}/authorize?response_type=onboard&redirect_uri=\{YOUR_REDIRECT_URL\}
** Click on `connect`
** Your application should appear in the office column of your farmer page
** If you need a way to send messages to your application you could use the IO Tool
Expand Down
45 changes: 43 additions & 2 deletions modules/ROOT/pages/commands/endpoint.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,47 @@

This chapter will list all messages to tell the agrirouter, what the endpoint is capable of, who it is and what it wants to receive.

== Ping Command

=== Definition

The ping command is used to check if the endpoint still exists and to know whether agrirouter correctly processes messages.

This is mainly useful when using an MQTT router device, to recognize if an endpoint has been deleted by the user from the agrirouter UI. All other cases can be known to the application itself.

=== Command

[cols=","]
|==================================
|Command |dke:ping
|Protobuf Schema | -
|TypeURL | -
|==================================

No parameters are needed.

=== Result

[cols="1,2,2"]
|=================================================================================
| | Case 1 | Case 2
|ResultCode |ACK | ACK_WITH_FAILURE
|Protobuf Schema | - | agrirouter.commons.Messages
|TypeURL | - | types.agrirouter.com/agrirouter.commons.Messages
|=================================================================================

The result is a simple `ACK` (accompanied with `response_code == 200`) or an `ACK_WITH_FAILURE` (`response_code == 404`).

==== ACK

Receiving an `ACK` means that the endpoint exists.

==== ACK_WITH_FAILURE

Receiving an `ACK_WITH_FAILURE` means that the endpoint has recently been deleted. You must remove this endpoint from your endpoints list.



== Capabilities Command

=== Definition
Expand All @@ -20,11 +61,11 @@ The list of technical message types can include any TechnicalMessageFormat menti
=== Command

[cols=",",]
|=====================================================================================
|=================================================================================
|Command |dke:capabilities
|Protobuf Schema |agrirouter.request.payload.endpoint.CapabilitySpecification
|TypeURL |types.agrirouter.com/agrirouter.request.payload.endpoint.CapabilitySpecification
|=====================================================================================
|=================================================================================

Parameters are the following elements:

Expand Down
Loading