An emulation of a home automation system where each device is represented as a single process. There are two kind of devices, control and interaction one, and various types. All have a "status", one or more switches and a register with parameters.
Read assignment task for more information
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
-
-
Clone this repo on your host using Git
$ git clone https://github.com/carlocorradini/domus.git
-
Change current working directory
$ cd domus/project/
-
Compile Domus using GNU Make
After compilation a
build
directory will be generated.build
contains two subfolders:-
bin
Domus binaries
-
obj
Domus object files
$ make build
-
-
-
All binaries are under
build/bin/
folder-
Domus
Domus main program for controlling Devices automatically
$ ./domus
-
Domus Manual
Domus manual controller for Human interaction
$ ./domus_manual
-
-
Perform the connection between Domus Manual and Domus.
Launch both programs as described above, and type:
-
Domus
Get Domus unique PID
> connect
-
Domus Manual
Connect to Domus using unique PID
> connect <PID>
-
Below is a table of supported command in Domus & Domus Manual
-
Command Description add <device> [name]
Add a <device>
to the system and show its features. Add[name]
to define a custom name for the<device>
clear
Clear the CLI interface del <id> [--all]
Delete the device with <id>
. If[--all]
delete all devices. If it's a control device, deletion is done recursivelydevice
Display all supported devices and their description exit
Close Domus help
Display help information about Domus hierarchy
Display the current devices hierarchy in the system, described by [name] <id>
info <id> [--all]
Show device info with <id>
. Show all devices info with [--all]link <id> to <id>
Connect two devices each other. One must be a control device list
Display all available devices and their features switch <id> <label> <pos>
Switch the device with <id>
the feature<label>
into<pos>
connect
Get unique Domus PID
for connecting Domus Manual control interface to Domus -
Command Description clear
Clear the CLI interface connect <PID>
Connect to Domus using unique <PID>
device
Display all supported devices and their description exit
Close Domus help
Display help information about Domus switch <id> <label> <pos>
Manually switch the device with <id>
the feature<label>
into<pos>
- History navigation using arrows:
↑
&↓
- Autocomplete using
Tab
- Info about command by adding
?
at the end of it (ex. help ? )
- GNU Make - GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.
- Git - Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency
We use Git for versioning
- Carlo Corradini - Initial work - 192451
- Simone Nascivera - Initial work - 193246
This project is licensed under the MIT License - see the LICENSE file for details
© Domus 2019