You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
2.5 KiB
Plaintext
104 lines
2.5 KiB
Plaintext
this will be a living doc
|
|
|
|
starting with for connection management:
|
|
|
|
listener:
|
|
- knows
|
|
- ip:port to listen to
|
|
- clients connect with{ip, port, clientType, model, id}
|
|
- is able to
|
|
- create coordinators for each clientType
|
|
- send new clients to coordiantor handlers via chan
|
|
- depends on
|
|
- clients sending known data (gRPC)
|
|
- NewCoordinator func
|
|
- implements
|
|
* shouldnt really have any callable methods
|
|
|
|
coordinator: (General)
|
|
- knows
|
|
- what client ids have already connected
|
|
- which managers correlate to which clients
|
|
- is able to
|
|
- create managers for new clients
|
|
- start managers for clients
|
|
- depends on
|
|
- listener for client structure
|
|
- manager for NewManager() function
|
|
- implements
|
|
- client connection handling
|
|
- general manager call
|
|
|
|
manager (general):
|
|
- knows
|
|
- client info
|
|
- timeout
|
|
- if it is active
|
|
- is able to
|
|
- establish a connection with a client
|
|
- stop when the connection drops
|
|
- depends on
|
|
- coordinator for start calls
|
|
- implements
|
|
- client connection creation
|
|
- client info storage
|
|
|
|
manager (reactor):
|
|
* embedds the gm
|
|
- knows
|
|
- devices attached to the reactor
|
|
- underlying client manager
|
|
- is able to
|
|
- maintain device struct
|
|
- no pings only control logic (i.e remove device, restart etc)
|
|
- depends on
|
|
- gm for client conn
|
|
- coordiantor for starts
|
|
- implements
|
|
- reactor structure tracking
|
|
|
|
manager (tui):
|
|
* embedds the gm
|
|
- knows
|
|
- structure of the system (ie reactors:devices)
|
|
- underlying client manager
|
|
- is able to
|
|
- keep track of system changes
|
|
- updates client from buffer or concurrent grpc?
|
|
- depends on
|
|
- RM to get system info
|
|
- coordinator for starts
|
|
- implements
|
|
- system tracking
|
|
|
|
reactor level coordinator: (right away this feels so fat compared)
|
|
- knows
|
|
- current connected devices
|
|
- server to init to
|
|
- its own hwinfo to establish itself as a client
|
|
- is able to:
|
|
- reach out to server on boot
|
|
- transmit client details
|
|
- keep reactor devices current
|
|
- depends on
|
|
- I2C package to notify of connected devices
|
|
- hardware info to get its client info
|
|
- server to handle connection
|
|
- sm for new manager
|
|
- implements
|
|
- reactor status handler for updates to other coords/managers
|
|
|
|
device itself:
|
|
- knows
|
|
- probe status ( maybe)
|
|
- data in buffer
|
|
- is able to
|
|
- clear buffer on request
|
|
- respond to commands
|
|
- implements
|
|
- data collection
|
|
- control execution
|
|
- depends on
|
|
- nothing its a driver
|
|
- maybe the control logic??
|