Open misterinterrupt opened 1 year ago
main(){
board = Board::new()
command_registry = CommandRegistry()
control_interface = ControlInterface(command_registry)
board.registerProcessCommandCallback(control_interface.process_command)
Loop {
control_interface.process_command()
}
}
—--------------
main(){
board = Board::new()
// init services
control_interface = ControlInterface(board)
Loop {
control_interface.runloop()
}
}
ControlInterface.new(board) {
command_registry = CommandRegistry() // command registry is a struct property
control_interface = ControlInterface(command_registry)
board.registerProcessCommandCallback(control_interface.process_command)
}
—---------------
main(){ // entry
board = Board::new() // init board
rriv = RRIV.init(board) // init app
Loop {
rriv.runloop()
}
}
RRIV.new(board) {
// init services
control_interface = ControlInterface(board)
}
RRIV.runloop() {
control_interface.runstep()
}
create an integrated usage of the control interface that uses the board object and also connects the control interface to the serial interrupt
entry makes a board
entry makes a rriv (a datalogger) with a specific board (there will be many versions of the board)
a rriv sets up the services which may or may not need the board
eventually, testing this will need a mock