refactor: node
This commit is contained in:
parent
bd9ce9f01f
commit
812748981a
8 changed files with 10 additions and 104 deletions
|
@ -1,6 +0,0 @@
|
|||
You can set up the node in very cool ways.
|
||||
|
||||
# `node.id` (optional)
|
||||
This will set the node's id.
|
||||
Your app may not start if the id is already taken.
|
||||
> tip: `0xFF------` is a free subnet in `domo_node`.
|
|
@ -1,3 +0,0 @@
|
|||
# Todo
|
||||
|
||||
- [ ] `0xFF------` subnet should be free to use without interference.
|
|
@ -1,45 +0,0 @@
|
|||
The `domo_node` implementation is quite limited.
|
||||
It's not made to be used standalone but rather in combination with other tools and use drivers.
|
||||
|
||||
# The Master node (`master`)
|
||||
Of these, there can only be one.
|
||||
The job of a master node is rather complex.
|
||||
|
||||
## Forwarding packets
|
||||
The most straight forward job of the node.
|
||||
It works by essentially having a hashmap with a reference to a socket.
|
||||
When a packet comes in the packet gets forwarded to the right node and socket.
|
||||
|
||||
## Handling network state
|
||||
The master node ensures there are no duplicate identifiers and therefore nodes.
|
||||
Also, it will make sure no invalid updates can be sent.
|
||||
Most packets go through the master node before getting to the source.
|
||||
Most because the subnet node can have private nodes and handle those themselves.
|
||||
|
||||
# The Bridge node (`bridge`)
|
||||
The bridge node is simple.
|
||||
In config you define where to forward the packets to, and they get delivered to there.
|
||||
|
||||
# The Subnet node (`subnet`)
|
||||
This is maybe another advanced node.
|
||||
It's a slave node that also acts as a master node.
|
||||
You can define private nodes in config, and they will be managed by the subnet node.
|
||||
For big domo networks this can be very useful to ensure privacy and keep control.
|
||||
|
||||
## Subnet properties
|
||||
The `domo_node` implementation ensures a couple properties.
|
||||
|
||||
### Lights (`all_lights` = `Switch`)
|
||||
With this property you can turn off all the lights in the subnet.
|
||||
This property will be absent is there are no lights present in the subnet.
|
||||
|
||||
> TODO: this feature requires distinction between switches and lights.
|
||||
> Either with extra identification information in `0x01`
|
||||
|
||||
### Enabled (`enabled` = `Switch`)
|
||||
Enable or disable the subnet.
|
||||
Functionality like: Master emulation, forwarding, private nodes will be paused.
|
||||
|
||||
### Forward (`forward` = `Swtich`)
|
||||
This will disable the forwarding of the subnet's node.
|
||||
Essentially make the subnet all private.
|
Loading…
Add table
Add a link
Reference in a new issue