-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement bridge-device functionality for onboarding non-OCF complian…
…t devices Implement a bridge-device service facilitating access to bridged devices, incorporating extensions beyond the OCF specification for local access. Notable distinctions include the use of a single opened UDP (potentially DTLS in the future) for Plgd bridged devices, contrasting with OCF bridged devices that utilize individual UDP/DTLS/TCP/TCP-TLS for both IPv4 and IPv6. * Key Points: - Access devices by including the query parameter `di=<deviceID>` in the request. - The discovery resource (`/oic/res`) without the `di` parameter provides links for all devices. Each link contains a deviceID, specifying the required value for the `di` query parameter. - Accessing another device without the `di` parameter results in failure. * Features: - Enables setting a Certificate Authority (CA) for cloud connection for each bridged device. - Implements a cloud connector for each bridged device with certificate validation for cloud connections. - Supports custom loggers. - Provides an API for configuring update/get/observe handlers for resources. - Supports both IPv4 and IPv6. --------- Co-authored-by: Daniel Adam <daniel.adam1922@protonmail.com>
- Loading branch information
1 parent
e22e783
commit 1107a03
Showing
150 changed files
with
9,826 additions
and
648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# TODO | ||
|
||
- Set RootCAs to the cloud connection | ||
- Unit tests | ||
- Set logger to package and propagate to package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/**************************************************************************** | ||
* | ||
* Copyright (c) 2023 plgd.dev s.r.o. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"), | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the specific | ||
* language governing permissions and limitations under the License. | ||
* | ||
****************************************************************************/ | ||
|
||
package cloud | ||
|
||
import ( | ||
"github.com/plgd-dev/device/v2/schema/cloud" | ||
) | ||
|
||
type Configuration struct { | ||
ResourceTypes []string `yaml:"-" json:"rt"` | ||
Interfaces []string `yaml:"-" json:"if"` | ||
Name string `yaml:"-" json:"n"` | ||
AuthorizationProvider string `yaml:"authorizationProvider" json:"apn"` | ||
CloudID string `yaml:"cloudID" json:"sid"` | ||
URL string `yaml:"cloudEndpoint" json:"cis"` | ||
LastErrorCode int `yaml:"-" json:"clec"` | ||
ProvisioningStatus cloud.ProvisioningStatus `yaml:"-" json:"cps"` | ||
AuthorizationCode string `yaml:"-" json:"-"` | ||
} |
Oops, something went wrong.