uem's Introduction
uem's People
Forkers
enterstudiouem's Issues
Internal representation comment
I think we should be using binary values to assign identifiers to sensors, here's my reasoning:
So the sensor modules each test for active sensors that are plugged in by looking for input voltage signals. It assigns each sensor a binary value counting from one to say 8 to make up one bit. So, 0000, 0001, 0010, 0011 etc. It then handshakes with the sub micro and sends these connected sensors. This sub micro detects the handshakes for active micros and assigns another binary bit to the sensor addresses. So say for 1 sensor micro handshaking it assigns: 0000 0000, 0000 0001 etc and for the next micro 0001 0000, 0001 0001 etc. This is then forwarded to the main micro with the completed addressing.
I think this method would allow for hot swopping of both sensors and sensor micros.
For the interface part I would like to use a canvas so that graphics can be used to represent parking base and a more customize able layout
0 V V V V V V V V 0
H 0 0 0 0 0 0 0 0 0
H 0 V V V V V V V 0
H 0 V V V V V V V 0
H 0 0 0 0 0 0 0 0 0
H 0 V V V V V V V 0
H 0 V V V V V V V 0
H 0 0 0 0 0 0 0 0 0
H 0 V V V V V V V 0
H 0 V V V V V V V 0
H 0 0 0 0 0 0 0 0 0
0 0 V V V V V V V 0
So the internal representation of a parking lot can be stored in a matrix,
where 0 represents the isles, V indicates a vertical parking bay and H represents a Horizontal
parking bay.
The dynamic status of the bays can be represented in another matrix where 0 : empty, 1 : occupied.
The use of 0 as isles in the first matrix can be changed to something else to avoid ambiguity.
For generating a new parking lot from the PC interface,
The interface can use a jPanel with a 2D array of buttons to represent the parking lot as cells,
initially the cells will be all blank but can individually be assigned as a V or H parking bay,
The remaining blank cells will be the isles.
The program will take into account the width and height of a V or H bay.
The sensors will then also need to be assigned to each cell, this will require knowing the address
of each sensor though, for simplicity we can create a reference to each sensor with simple integers
1, 2, 3...
This layout also provides an interactive interface, eg. once the system is set up and the final system
is running, the onscreen interface will display the parking lot, as the array of cells, and each bay
can be clicked on to view stats of the bay, eg. how long its been occupied or its % of use relative to the
other bays.
Implement java interface set methods for database
Create user table
Table should be related to secondary table allow for admin and security to be assigned to multiple parking lots
Remove paking bay total and used amount from parking lot table. Values can be calculated from parking bay table
Connect to database from java interface
Abstract data objects received from database
Implement java interface get methods for database
Logging table in database
Create a table which stores sensor id, time of activation, time of deactivation.
Change identifier in parking_bay table to blob
Also change in Java to binary object
Add datetime to parking bay to record occurrence of state change
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.