ERIS CORE
SvcSerialCommandInterface Class Reference

Serial communication service and interface Serial commands (rx):
. More...

#include "svcSerialCommandInterface.h"

+ Inheritance diagram for SvcSerialCommandInterface:
+ Collaboration diagram for SvcSerialCommandInterface:

Public Member Functions

 SvcSerialCommandInterface ()
 
void empty ()
 zero out the transmit buffer and reset the write index More...
 
void getFocus ()
 Get focus from the AppManager. More...
 
uint16_t getID ()
 Get the ID object. More...
 
bool isName (const char *name_string)
 Compares the name_string to the app class instance name (string) More...
 
virtual void messageHandler (AppBaseClass *sender, const char *message)
 receiver method for inter-app string based communication More...
 
virtual void onAnalog1 (uint16_t uval, float fval)
 Event handler for analog 1 event. More...
 
virtual void onAnalog2 (uint16_t uval, float fval)
 Event handler for analog 2 event. More...
 
virtual void onAnalog3 (uint16_t uval, float fval)
 Event handler for analog 3 event. More...
 
virtual void onAnalog4 (uint16_t uval, float fval)
 Event handler for analog 4 event. More...
 
virtual void onFocus ()
 Event handler called when the app gains focus. More...
 
virtual void onFocusLost ()
 Event handler called when the app loses focus. More...
 
virtual void onTouch (uint16_t t_x, uint16_t t_y)
 Event handler called on touch. More...
 
virtual void onTouchDrag (uint16_t t_x, uint16_t t_y)
 Event handler for touch drag. More...
 
virtual void onTouchRelease (uint16_t t_x, uint16_t t_y)
 Event handler for touch release. More...
 
void registerApp (AppBaseClass *app)
 registers the app instance with the AppManager More...
 
bool requestStartLZ4Message ()
 request to start a lz4 compressed message
starts the message and returns true if available returns false if busy More...
 
void send ()
 immediately transmit then clear the txBuffer More...
 
void sendLZ4Message ()
 Calling this function signals the end of a compressed message.
The txBuffer contents are lz4 compressed, base64 encoded and finally sent.
The serial message format is "LZ4 [UNCOMPRESSED_SIZE] [BASE64 encoded LZ4 compressed message]". More...
 
void setDimension (int16_t new_width, int16_t new_height)
 Set the Dimension object. More...
 
void setName (const char *name_string)
 Set the app class instance name (string) More...
 
void setParent (AppBaseClass *parent)
 Set the Parent object. More...
 
void setPosition (int16_t new_origin_x, int16_t new_origin_y)
 Set the Position object. More...
 
void setWidgetDimension (int16_t new_width, int16_t new_height)
 Set the Widget Dimension object. More...
 
void setWidgetPosition (int16_t new_origin_x, int16_t new_origin_y)
 Set the Widget Position object. More...
 
bool throttle ()
 returns true if the available serial buffer falls below SERIAL_THROTTLE_BUFFER_REMAINING_THRESHOLD if the buffer falls below SERIAL_THROTTLE_CHECK_CONNECTION_BUFFER_THRESHOLD delay for a small period of time if another check finds the buffer isn't moving then flush the buffer. returns false otherwise More...
 

Public Attributes

int16_t h
 
int16_t height
 
char name [MAX_NAME_LENGTH]
 
int16_t origin_x
 
int16_t origin_y
 
int16_t w
 
int16_t widget_height
 
int16_t widget_origin_x
 
int16_t widget_origin_y
 
int16_t widget_width
 
int16_t width
 
int16_t x
 
int16_t y
 

Protected Member Functions

void _updatePosition ()
 
uint16_t checksum (const char *msg)
 
void flush ()
 
void messageHandler_GET ()
 
void messageHandler_GET_RAM1 ()
 
void messageHandler_GET_RAM2 ()
 
void messageHandler_LS ()
 
void messageHandler_UPDATE_DD ()
 
void messageHandler_WREN_SCRIPT_COMPILE ()
 
void messageHandler_WREN_SCRIPT_EXECUTE ()
 
void messageHandler_WREN_SCRIPT_SAVE ()
 
void messageHandler_WREN_SCRIPT_START ()
 
void releasePopUp ()
 gives up popup More...
 
void render () override
 render loop More...
 
void requestPopUp (bool exclusive=false)
 request popup from the AppManager
will be activated by the next render loop
applications in popup mode are guaranteed to be rendered last; preventing any overdraw
exclusive mode option blocks the render calls of all other apps by the AppManager usefull
for taking over full screen rendering while allowing the apps update loops to continue. More...
 
void returnFocus ()
 give up focus More...
 
void selfRegister ()
 self register the instance with the AppManager More...
 
void setUpdatePriority (uint16_t level)
 Set the update priority
the level sets the number of update opportunities before the update method is actually called. More...
 
void startLZ4Message ()
 
void streamReceiveHandler ()
 
void streamTransmitHandler ()
 
void txOverflowHandler ()
 
void update () override
 update loop More...
 
size_t write (uint8_t c)
 

Protected Attributes

AudioDirectorad
 
AppManageram
 
uint16_t cycle_time
 
uint16_t cycle_time_max
 
ILI9341_t3_ERISdraw
 
elapsedMicros et_render_period
 
elapsedMillis et_since_periodic_data_dict_tx
 
elapsedMillis et_since_periodic_stats_tx
 
elapsedMillis et_since_poll
 
elapsedMicros et_update_period
 
FsFile file
 
bool has_focus
 
bool has_pop
 
uint16_t id
 
uint32_t index_capture_buffer
 
uint16_t index_rx_buffer
 
uint16_t index_tx_buffer
 
bool is_capturing_bulk_data
 
bool is_periodic_messages_enabled
 
bool is_streaming_file
 
AppBaseClassnext_app_node
 
char * p_capture_buffer
 
char * p_multipart_header
 
char * p_received_chars
 
SdFs * p_SD
 
char * p_stream_file
 
char * p_stream_path
 
char * p_tx_Buffer
 
char * p_working_buffer
 
AppBaseClassparent_node
 
AppBaseClassprevious_app_node
 
uint16_t render_cpu_time
 
uint16_t render_cpu_time_max
 
uint16_t render_period_max
 
SvcSerialCommandInterfacesci
 
SdFs * sd
 
uint64_t stream_pos
 
bool touch_state
 
volatile bool tx_buffer_overflow_flag
 
uint16_t update_cpu_time
 
uint16_t update_cpu_time_max
 
uint16_t update_period_max
 
uint16_t update_priority
 
uint16_t update_priority_counter
 

Detailed Description

Serial communication service and interface Serial commands (rx):
.

LS [PATH] GET [PATH] get file is responded with FS messages
ACON request current audio block connections
CONNECT make an audio block connection
DISCONNECT break an audio block connection
APC audio block parameter control message
AA broadcast message to active app
STATS
CQT_CFG request a dump of the cqt bin configs
GET_DD request a dump of the data dictionary

UPDATE_DD key val set a key value

Serial messages (tx):

CQT_H (CQT BINS - High Range)
CQT_L (CQT " Low Range")
CQT_EOF (End of analysis frame)
DIR (directory contents - aka the result of the ls command)
DIR_EOF
S (FFT window stream)
FS (file stream)
FS_END (file stream end, indicate to client eof)
GET_ERR (file request error response )
ACON START (begin audio connection list)
ACON END (end audio connection list)
RAM1 JSON container
RAM2 JSON container

Definition at line 53 of file svcSerialCommandInterface.h.


The documentation for this class was generated from the following files: