mpluz-assignment
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.6%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: marcvredenbregt
- License: mit
- Language: HTML
- Default Branch: main
- Size: 294 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Mpluz* Assignment
This is a TypeScript project to get you started with your Mpluz* assignment.
It uses jest for testing, prettier for formatting, and typedoc for document generation.
npm run lint will compare your code against the linter settings. This repository is set to use spaces for indentation and single quotes for strings.
npm run test will run your tests. For a coverage report, use npm run test:coverage. And to have tests watch for changes and automatically re-run, use npm run test:watch.
npm run start:watch will run App.ts and re-run on changes.
Application
Intro
This TypeScript codebase is a console application to simulate a Nexxis OR. It works with a router, encoders, and decoders. The encoders have video inputs which can be routed to a decoder which has outputs. For this to happen, the encoder must have a video signal on the input, and the decoder must have a destination connected to an output (e.g., monitor).
Details
Router
A Nexxis OR can have only one Router, this Router can have multiple Dongles (encoders, decoders and transcoders). An Encoder is an input device and a Decoder is a output device. A Transcoder is used to convert the high bandwidth input stream to a recordable bandwith (not used in this assigment).
Dongles (Encoders / Decoders)
A Dongle can have 1 or 2 connectors (inputs or outputs) depending on the model.
The Dogle of type Encoder can:
- connect an image source to an
Inputand it'sInputStatewill change fromNoSignaltoSignal - disconnected an image source from an
Inputand it'sInputStatewill change fromSignaltoNoSignal - emit an event when an image source is disconnected
The Dogle of type Decoder can:
- connected an image destination (e.g. monitor) to an
Outputand it'sOuputStatewill change fromDisconnectedtoConnected - disconnected a destination (e.g. monitor) from an
Outputand it'sOuputStatewill change fromConnectedtoDisconnected - routed an
Inputof anEncoderto anOuput - unrouted an
Inputof anEncoderto anOuput - handle an
Inputdisconnected event to unroute disconnectedInputfromOutput(s)
Assigment
The assignment consists of three parts:
- A bugfix
- A new feature
- A change of handling events
Each part should be a separate branch on the codebase. To start working on a new branch, do a checkout while creating the branch, e.g., git checkout -b MP-001-Bugfix. Create a NOTES.md file in the root of the project with a description of the steps that will be taken to solve each part. Commit each piece of finished code so it is easy to track progress to your chosen solution.
Bugfix (MP-001)
One of the test is failing. Please find out why and fix the problem.
New feature (MP-002)
Dongles have a lot of properties, but it is not possible to give them a label for easy reference. Please add the feature to the Dongles so that a label can be added to an Encoder and Decoder. If provided, the label should be a string of max 15 characters. The label should be accessible via a getter.
example:
``` const encoder = new Encoder(DongleModel.MNA240, '192.168.0.1'); encoder.addLabel('CAMERA 1');
console.log(encoder.label); -> 'CAMERA 1' ```
Change of event handling (MP-003)
The event listeners are now initiated in the Outputs via:
events.on('inputDisconnected', () => this.handleInputDisconnected());
With this solution, there is a lot of overhead as can be seen in the console at OR-1 - Disconnecting. Each Output has its own listener. Please optimize the handling of events so that there is only one event listener per Router.
Owner
- Name: Marc Vredenbregt
- Login: marcvredenbregt
- Kind: user
- Repositories: 1
- Profile: https://github.com/marcvredenbregt
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit. # Visit https://bit.ly/cffinit to generate yours today! cff-version: 1.2.0 title: Mpluz Assignment message: >- type: software authors: repository-code: 'https://github.com/vanhooferwin/mpluz-assignment/' url: 'https://github.com/vanhooferwin/mpluz-assignment/' abstract: A Typescript Assignment keywords: - typescript - tdd - javascript license: MIT
GitHub Events
Total
Last Year
Dependencies
- 487 dependencies
- @types/events ^3.0.3 development
- @types/jest ^29.5.11 development
- @types/node ^20.11.19 development
- @types/uuid ^9.0.8 development
- @typescript-eslint/eslint-plugin ^6.19.0 development
- @typescript-eslint/parser ^6.19.0 development
- eslint ^8.56.0 development
- eslint-import-resolver-typescript ^3.6.1 development
- eslint-plugin-import ^2.29.1 development
- eslint-plugin-jsdoc ^48.0.2 development
- eslint-plugin-prefer-arrow ^1.2.3 development
- eslint-plugin-tsdoc ^0.2.17 development
- jest ^29.7.0 development
- prettier ^3.2.2 development
- ts-jest ^29.1.1 development
- typedoc ^0.25.7 development
- typescript ^5.3.3 development
- uuid ^9.0.1