Skip to content

A simulated workplace environment where students must demonstrate OO skills by interpreting and interacting with modern software requirements

License

Notifications You must be signed in to change notification settings

ag-tafe/civ-ipriot-proj-carpark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPRIoT Project: Simulated Workplace Scenario

A simulated workplace environment where to demonstrate OO skills by interpreting and interacting with modern software requirements.

Description

This is an implementation of the car park project without using Raspberri PI.

How to run

  1. Clone the project onto your computer using
git clone
  1. Change to the cloned repository's directory:
cd civ-ipriot-proj-carpark
  1. Create virtual environment
python3 -m venv .venv

Then activate the virtual environment:

  • On Linux/macOS:
source .venv/bin/activate
  • On Windows:
.venv\Scripts\activate
  1. Install the SmartPark project in development mode using:
pip install -e .
  1. Navigate to "without_pi" directory using cd command
cd without_pi

The folder contents are listed below. You'll need to make sure mqtt broker service is running on default port (1883) on localhost or update "toml_no_pi_configuration.toml" accordingly. Run "main01.py" and run "main02.py" at the same time e.g.

python3 main01.py
python3 main02.py

The directory contents:

│
├── without_pi/
│   ├── main01.py           <-- run this
│   ├── main02.py       <-- and that
│   ├── requirements.txt           <-- project dependencies
│   ├── car_detector.py      <-- classes CarDetector, Sensor
│   ├── car_park_display.py  < -- class CarParkDisplay
│   ├── test_config.py       <-- unit test
│   └── toml_no_pi_configuration.toml <-- toml configuration
  • main01.py: Reads the configuration file and passes dictionary to the classes initializers. The window has 2 buttons for incoming and outgoing cars. Once the user clicks on either button a random temperature value, time stamp and the fact that a car has entered or exited the car park are sent via MQTT protocol.
  • main02.py: This is a "screen" with information for a car park manager or a car park user. This window receives data via MQTT protocol and updates available bays, temperature, last update time and current time.

Test

Run test_config.py

About

A simulated workplace environment where students must demonstrate OO skills by interpreting and interacting with modern software requirements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%