-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kubeedge-main' into main
Signed-off-by: zongke <zongk@shangyuantech.com> # Conflicts: # pkg/modbus/device/twindata.go
- Loading branch information
Showing
51 changed files
with
1,947 additions
and
211 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: FOSSA | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "^1.14.x" | ||
- run: go version | ||
# Runs a set of commands to initialize and analyze with FOSSA | ||
- name: run FOSSA analysis | ||
env: | ||
# FOSSA Push-Only API Token | ||
FOSSA_API_KEY: '87a9c35cbed49f802657f98b60134ee8' | ||
run: | | ||
export GOPATH=$HOME/go | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash | ||
fossa init | ||
fossa analyze |
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,93 @@ | ||
name: Main CI WorkFlow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
name: Verify vendor, do lint | ||
env: | ||
GOPATH: /home/runner/work/${{ github.repository }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
path: ./src/github.com/${{ github.repository }} | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Install dependences | ||
run: | | ||
sudo apt-get install -y jq | ||
- name: Run verify test | ||
run: make verify | ||
working-directory: ./src/github.com/${{ github.repository }} | ||
|
||
- name: Run lint test | ||
run: make lint | ||
working-directory: ./src/github.com/${{ github.repository }} | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
name: Multiple build | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Install dependences | ||
run: sudo apt-get install -y upx-ucl gcc-aarch64-linux-gnu libc6-dev-arm64-cross gcc-arm-linux-gnueabi libc6-dev-armel-cross | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- run: make | ||
|
||
docker_build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
name: Multiple docker image build | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- run: make modbusmapper_image | ||
|
||
- run: make opcuamapper_image |
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,65 @@ | ||
# This file contains all available configuration options | ||
# with their default values. | ||
|
||
# options for analysis running | ||
run: | ||
# default concurrency is a available CPU number | ||
concurrency: 4 | ||
|
||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
timeout: 10m | ||
|
||
# exit code when at least one issue was found, default is 1 | ||
issues-exit-code: 1 | ||
|
||
# which dirs to skip: issues from them won't be reported; | ||
# can use regexp here: generated.*, regexp is applied on full path; | ||
# default value is empty list, but default dirs are skipped independently | ||
# from this option's value (see skip-dirs-use-default). | ||
# "/" will be replaced by current OS file path separator to properly work | ||
# on Windows. | ||
skip-dirs: | ||
- vendor | ||
- fake | ||
- externalversions | ||
|
||
# output configuration options | ||
output: | ||
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" | ||
format: colored-line-number | ||
|
||
# print lines of code with issue, default is true | ||
print-issued-lines: true | ||
|
||
# print linter name in the end of issue text, default is true | ||
print-linter-name: true | ||
|
||
# make issues output unique by line, default is true | ||
uniq-by-line: true | ||
|
||
linters-settings: | ||
gci: | ||
local-prefixes: github.com/kubeedge | ||
misspell: | ||
ignore-words: | ||
- mosquitto | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- goconst | ||
- errcheck | ||
- gofmt | ||
- golint | ||
- gosimple | ||
- govet | ||
- misspell | ||
- whitespace | ||
|
||
issues: | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
- path: pkg/opcua/driver/client.go | ||
linters: | ||
- gofmt | ||
|
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,63 @@ | ||
|
||
apiVersion: devices.kubeedge.io/v1alpha2 | ||
kind: Device | ||
metadata: | ||
name: sensor-tag-instance-01 | ||
labels: | ||
description: TISimplelinkSensorTag | ||
manufacturer: TexasInstruments | ||
model: cc2650-sensortag | ||
spec: | ||
deviceModelRef: | ||
name: cc2650-sensortag | ||
protocol: | ||
bluetooth: | ||
macAddress: "BC:6A:29:AE:CC:96" #pls note it is optional to provide MAC address | ||
nodeSelector: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: '' | ||
operator: In | ||
values: | ||
- edge-node1 #pls give your edge node name | ||
propertyVisitors: | ||
- propertyName: temperature | ||
bluetooth: | ||
characteristicUUID: f000aa0104514000b000000000000000 | ||
dataConverter: | ||
startIndex: 1 | ||
endIndex: 0 | ||
shiftRight: 2 | ||
orderOfOperations: | ||
- operationType: Multiply | ||
operationValue: 0.03125 | ||
- propertyName: temperature-enable | ||
bluetooth: | ||
characteristicUUID: f000aa0204514000b000000000000000 | ||
dataWrite: | ||
"ON": [1] #Here "ON" refers to the value of the property "temperature-enable" and [1] refers to the corresponding []byte value to be written into the device when the value of temperature-enable is "ON" | ||
"OFF": [0] | ||
- propertyName: io-config-initialize | ||
bluetooth: | ||
characteristicUUID: f000aa6604514000b000000000000000 | ||
- propertyName: io-data-initialize | ||
bluetooth: | ||
characteristicUUID: f000aa6504514000b000000000000000 | ||
- propertyName: io-config | ||
bluetooth: | ||
characteristicUUID: f000aa6604514000b000000000000000 | ||
- propertyName: io-data | ||
bluetooth: | ||
characteristicUUID: f000aa6504514000b000000000000000 | ||
dataWrite: | ||
"Red": [1] #Here "Red" refers to the value of the property "io-data" and [1] refers to the corresponding []byte value to be written into the device when the value of io-data is "Red" | ||
"Green": [2] | ||
"RedGreen": [3] | ||
"Buzzer": [4] | ||
"BuzzerRed": [5] | ||
"BuzzerGreen": [6] | ||
"BuzzerRedGreen": [7] | ||
status: | ||
twins: | ||
- propertyName: temperature-enable | ||
- propertyName: io-data |
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,44 @@ | ||
apiVersion: devices.kubeedge.io/v1alpha2 | ||
kind: DeviceModel | ||
metadata: | ||
name: cc2650-sensortag | ||
namespace: default | ||
spec: | ||
properties: | ||
- name: temperature | ||
description: temperature in degree celsius | ||
type: | ||
int: | ||
accessMode: ReadOnly | ||
maximum: 100 | ||
unit: degree celsius | ||
- name: temperature-enable | ||
description: enable data collection of temperature sensor | ||
type: | ||
string: | ||
accessMode: ReadWrite | ||
defaultValue: 'ON' | ||
- name: io-config-initialize | ||
description: initialize io-config with value 0 | ||
type: | ||
int: | ||
accessMode: ReadWrite | ||
defaultValue: 0 | ||
- name: io-data-initialize | ||
description: initialize io-data with value 0 | ||
type: | ||
int: | ||
accessMode: ReadWrite | ||
defaultValue: 0 | ||
- name: io-config | ||
description: register activation of io-config | ||
type: | ||
int: | ||
accessMode: ReadWrite | ||
defaultValue: 1 | ||
- name: io-data | ||
description: data field to control io-control | ||
type: | ||
int: | ||
accessMode: ReadWrite | ||
defaultValue: 0 |
Oops, something went wrong.