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

feat/connector-elsys #36

Merged
merged 5 commits into from
Jul 12, 2024
Merged

feat/connector-elsys #36

merged 5 commits into from
Jul 12, 2024

Conversation

mateuscardosodeveloper
Copy link
Collaborator

@mateuscardosodeveloper mateuscardosodeveloper commented Jun 28, 2024

Decoder Description

Add ELSYS sensor decoders

Type of change

  • Adding a new Decoder of Connector
  • Adding a new Decoder of Network
  • Update or fixing an issue in existing Decoder

Decoder Information and Payload to test and review

  • Documentation of the hardware or protocol:
  • Payload of example the test the decoder:

Checklist for Adding a New Decoder

  • Created a new folder under ./decoders/network/ or ./decoders/connector/ with the name of your decoder.
  • Added a network.jsonc or connector.jsonc file that follows the structure defined in ./schema/.
  • Created version folders and added manifest.jsonc files for each version.
  • Followed the folder structure guidelines for manufacturer and sensor/device model.
  • The code has unit test and it's in TypeScript.

decoders/connector/elsys/elt-2/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/elt-lite/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/elt-lite/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/emk5/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/emk5/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/ers-desk/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/ers-eye/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/ers-lite/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/ers-sound/v1.0.0/payload.js Outdated Show resolved Hide resolved
decoders/connector/elsys/ers/v1.0.0/payload.js Outdated Show resolved Hide resolved
@Freddyminu Freddyminu requested a review from vitorfdl July 2, 2024 14:44
@Freddyminu
Copy link
Collaborator

Freddyminu commented Jul 3, 2024

@mateuscardosodeveloper Add the following tests:

`
describe("Shall not be parsed", () => {
let payload = [
{ variable: "shallnotpass", value: "04096113950292" },
{ variable: "fport", value: 9 },
];

payload = decoderRun(file_path, { payload });

test("Output Result", () => {
expect(Array.isArray(payload)).toBe(true);
});

test("Not parsed Result", () => {
expect(payload).toEqual([
{ variable: "shallnotpass", value: "04096113950292" },
{ variable: "fport", value: 9 },
]);
});
});
`

@FabianoEger FabianoEger merged commit 657f5e3 into main Jul 12, 2024
7 checks passed
@FabianoEger FabianoEger deleted the feat/connector-elsys branch July 12, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants