Go to the documentation of this file.
2 #ifndef __BITTYBUZZBYTECODE_H_
3 #define __BITTYBUZZBYTECODE_H_
25 #endif // __BITTYBUZZBYTECODE_H_
uint16_t getBytecodeLength() const override
Get the size of the BittyBuzz byte code.
Definition: BittyBuzzBytecode.cpp:38
void setSystemDeviceState(DeviceState state) override
set the system Connection state and set the seven segment accordingly
Definition: ApplicationInterface.cpp:41
virtual void setSystemConnectionState(ConnectionState state)=0
set the system Connection state and light the necessary LED the right color
~BittyBuzzBytecode()=default
Definition: SystemStates.h:25
Definition: RemoteHandshakeUI.h:7
Definition: HostHandshakeUI.h:7
static constexpr LED s_remoteLed
Definition: ApplicationInterface.h:36
virtual void setButtonCallback(Button button, buttonCallbackFunction_t callback, void *context)=0
Sets the callback associated with a given button press.
RemoteHandshakeUI(IApplicationInterface &appInterface)
Definition: RemoteHandshakeUI.cpp:3
UserStates getUserStates() const override
get the user states
Definition: ApplicationInterface.cpp:76
BittyBuzzBytecode(ILogger &logger, const uint8_t *bytecode, uint16_t bytecodeLength)
Definition: BittyBuzzBytecode.cpp:25
IUserInterface & getUserInterface()
Returns an instance of the platform dependent UserInterface.
Definition: BSPContainer.cpp:19
HostHandshakeUI(IApplicationInterface &appInterface)
Definition: HostHandshakeUI.cpp:3
IApplicationInterface & m_appInterface
Definition: UserUI.h:17
void setLed(bool state) override
Set the led on or off.
Definition: UserUI.cpp:5
Definition: IApplicationInterface.h:7
ILogger & m_logger
Definition: BittyBuzzBytecode.h:20
virtual void setUserLed(bool state)=0
set the user LED
void setSegment(UserSegment segment) override
Set the user seven segment to a value.
Definition: UserUI.cpp:7
Definition: UserStates.h:23
void handshake(bool handshaked) override
Sets the handshake status of the device.
Definition: HostHandshakeUI.cpp:6
ApplicationStates getApplicationState() const override
get the application states
Definition: ApplicationInterface.cpp:81
bool m_userLed
Definition: UserStates.h:24
ConnectionState m_connection
the state of the connection with the host
Definition: SystemStates.h:33
Definition: ApplicationStates.h:7
void handshake(bool handshaked) override
Sets the handshake status of the device.
Definition: RemoteHandshakeUI.cpp:6
virtual void setHexDisplay(uint8_t value)=0
Sets the hex display to a given 8 bit value (not available on the HiveSight)
ApplicationInterface(IUserInterface &userInterface, IMutex &mutex)
Definition: ApplicationInterface.cpp:4
ButtonCallbackRegister & getButton1CallbackRegister()
get the button 1 callback register
Definition: ApplicationInterfaceContainer.cpp:17
virtual void setSystemButtonCallback(Button button, buttonCallbackFunction_t callback, void *context)=0
set the systems button to a callback
virtual void setSystemRemoteHandshaked(bool handshaked)=0
set the system Remote handshake and light the necessary LED
const uint8_t * m_bytecode
Definition: BittyBuzzBytecode.h:21
virtual void setSystemHostHandshaked(bool handshaked)=0
set the system Host handshake and light the necessary LED
HostHandshakeUI & getHostHandshakeUI()
get the host handshake UI
Definition: ApplicationInterfaceContainer.cpp:33
void setSystemHostHandshaked(bool handshaked) override
set the system Host handshake and light the necessary LED
Definition: ApplicationInterface.cpp:13
void setSystemRemoteHandshaked(bool handshaked) override
set the system Remote handshake and light the necessary LED
Definition: ApplicationInterface.cpp:7
Button
Buttons present on the board.
Definition: IUserInterface.h:16
void setSystemButtonCallback(Button button, buttonCallbackFunction_t callback, void *context) override
set the systems button to a callback
Definition: ApplicationInterface.cpp:51
SystemStates getSystemStates() const override
set the system states
Definition: ApplicationInterface.cpp:71
UserStates m_userStates
Definition: ApplicationStates.h:9
bbzvm_bcode_fetch_fun getBytecodeFetchFunction() const override
Obtain the function that fetches the BittyBuzz byte code.
Definition: BittyBuzzBytecode.cpp:34
void setUserSegment(UserSegment segment) override
set the user seven segment
Definition: ApplicationInterface.cpp:63
ConnectionStateUI(IApplicationInterface &appInterface)
Definition: ConnectionStateUI.cpp:3
IApplicationInterface & m_appInterface
Definition: DeviceStateUI.h:14
IApplicationInterface & m_appInterface
Definition: ConnectionStateUI.h:14
IUserInterface & m_userInterface
Definition: ApplicationInterface.h:41
ConnectionStateUI & getConnectionStateUI()
get the connection state UI
Definition: ApplicationInterfaceContainer.cpp:23
A logger class with basic logging capabilities.
Definition: ILogger.h:35
virtual void setRGBLed(RgbColor color)=0
Sets the RGB LED to a given color.
static constexpr LED s_userLed
Definition: ApplicationInterface.h:38
UserSegment m_userSegment
Definition: UserStates.h:25
void setUserLed(bool state) override
set the user LED
Definition: ApplicationInterface.cpp:57
Definition: BittyBuzzBytecode.h:9
void setSystemConnectionState(ConnectionState state) override
set the system Connection state and light the necessary LED the right color
Definition: ApplicationInterface.cpp:19
virtual void setSystemDeviceState(DeviceState state)=0
set the system Connection state and set the seven segment accordingly
void setDeviceState(DeviceState state) override
Sets the state of the device.
Definition: DeviceStateUI.cpp:5
UserUI(IApplicationInterface &appInterface)
Definition: UserUI.cpp:3
ConnectionState
Definition: SystemStates.h:4
DeviceStateUI(IApplicationInterface &appInterface)
Definition: DeviceStateUI.cpp:3
ButtonCallbackRegister & getButton0CallbackRegister()
get the button 0 callback register
Definition: ApplicationInterfaceContainer.cpp:11
void setConnectionState(ConnectionState state) override
Sets the state of the connection.
Definition: ConnectionStateUI.cpp:6
Definition: DeviceStateUI.h:6
Definition: ConnectionStateUI.h:6
virtual void setLed(LED led, bool state)=0
Sets an LED on or off.
IMutex & m_mutex
Definition: ApplicationInterface.h:42
static constexpr LED s_hostLed
Definition: ApplicationInterface.h:37
Manages the user interface The user interface can consist of buttons, LED, serial print ports,...
Definition: IUserInterface.h:36
UserSegment
Definition: UserStates.h:4
Manages the BittyBuzz byte code.
Definition: IBittyBuzzBytecode.h:9
IApplicationInterface & m_appInterface
Definition: HostHandshakeUI.h:15
SystemStates m_systemStates
Definition: ApplicationStates.h:8
virtual void setUserSegment(UserSegment segment)=0
set the user seven segment
DeviceState m_device
the overall state of the device
Definition: SystemStates.h:36
DeviceStateUI & getDeviceStateUI()
get the device state UI
Definition: ApplicationInterfaceContainer.cpp:28
void(* buttonCallbackFunction_t)(void *instance)
Prototype for a callback from a button press.
Definition: IUserInterface.h:28
DeviceState
Definition: SystemStates.h:6
bool m_hostHandshaked
if the handshake with the host is successfull
Definition: SystemStates.h:30
UserUI & getUserUI()
get the UI available to the user
Definition: ApplicationInterfaceContainer.cpp:43
const uint16_t m_bytecodeLength
Definition: BittyBuzzBytecode.h:22
RemoteHandshakeUI & getRemoteHandshakeUI()
get the remote handshake UI
Definition: ApplicationInterfaceContainer.cpp:38
bool m_remoteHandshaked
if the handshake with the esp is successfull
Definition: SystemStates.h:27
ApplicationStates m_states
Definition: ApplicationInterface.h:43
Definition: ApplicationInterface.h:8
IApplicationInterface & m_appInterface
Definition: RemoteHandshakeUI.h:15
ApplicationInterface & getApplicationInterface()
Definition: ApplicationInterfaceContainer.cpp:5