|
INOS
|
Main inco explorer class for TFT display. More...
#include <cinossiotftexp.h>

Public Member Functions | |
| CINOSSioTftExp (const char *acName, CINOSSioTft *apDisplay, const char *acConfig) | |
| Constructor. More... | |
| virtual | ~CINOSSioTftExp () |
| Destructor. | |
| void | SelLanguage (uint32 auLangIndex) |
| Select language to display. More... | |
| uint32 | GetLanguage () |
| Get selected language to display. More... | |
| const char * | GetLangFileName (uint32 auLangIndex) const |
| Check if language file by index available. More... | |
| void | SetUserLevel (uint32 auLevel) |
| Set user level. More... | |
| void | GetActualTab (char *apTab, uint32 auLength, bool abFullPath=false) |
| Get currently selected tab. More... | |
| void | SetActualTab (char *apTab) |
| Set current tab. More... | |
| void | GetActualVar (char *apVar, uint32 auLength) |
| Get default name of currently selected variable. More... | |
| void | GetActualVarLang (char *apVar, uint32 auLength) |
| Get actual selected variable in selected language. More... | |
| void | GetActualVarValue (char *apVal, uint32 auLength) |
| Get value of actual selected variable. More... | |
| bool | UpdateInco () |
| Update inco item pointers of items e.g. after new registrations. More... | |
| bool | RepaintNeeded () |
| void | Refresh () |
| void | HardCopy (int16 aiXX1=-1, int16 aiYY1=-1, int16 aiXX2=-1, int16 aiYY2=-1, bool abUseRLE=true) |
| uint32 | GetPressedKeys () |
| Get pattern of pressed user keys (matrix). More... | |
| uint32 | GetFlags () |
| Get internal flags (e.g. shift mode). More... | |
| CINOSSioTftExpTab * | GetTopTab () const |
| To get the top tab pointer. More... | |
| void | EnableRefresh (bool abRefresh) |
| void | SetTabCharacteristics (const char *const acTabPath, uint32 auCharacteristics, ETFTCharCmd aeCmd) |
| Set (add/remove) characteristics of a tab. More... | |
| bool | SetVarCharacteristics (const char *const acVarPath, uint32 auCharacteristics, ETFTCharCmd aeCmd) |
| Set (add/remove) characteristics of a variable. More... | |
| bool | SetProcCharacteristics (const char *const acPath, uint32 auCharacteristics, ETFTCharCmd aeCmd) |
| void | Reset () |
| Manually reset display. | |
| void | SetInitDoneCallback (InitDoneFunc callback, void *apContext) |
| Register callback for notification about when the explorer is completely initialized. | |
| void | SetTabChangeCallback (OnTabChangeFunc callback, void *apContext) |
| Register callback for tab change notification. | |
Public Member Functions inherited from CINOSTask | |
| CINOSTask (char *apName=nullptr, uint32 auStackSize=defDefaultStackSize, uint32 auPriority=DF_INOS_TASK_PRIO_LOWEST, bool abFloatingPoint=true, uint32 auTimeSlice=defDefaultTimeSlice, bool abInterruptsDisabled=false, void *apHandler=0, void *apObject=0) | |
| Create a task with given properties. One needs to Resume the task after creation to get it running. More... | |
| CINOSTask (std::function< void(void *)> aFunction, void *apParam=nullptr, uint8 auPriority=DF_INOS_TASK_PRIO_LOWEST) | |
| Create a task with given properties. One needs to Resume the task after creation to get it running. More... | |
| CINOSTask (const char *apName, std::function< void(void *)> aFunction, void *apParam=nullptr, uint8 auPriority=DF_INOS_TASK_PRIO_LOWEST) | |
| Create a task with given properties. One needs to Resume the task after creation to get it running. More... | |
| virtual | ~CINOSTask () |
| Destroy task. | |
| virtual uint32 | Shutdown (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
| Shutdown task, used to shutdown a foreign task. More... | |
| virtual uint32 | Join () |
| Join task or in other words, wait till it terminates. More... | |
| virtual void | Detach () |
| Detach task from parent. One uses this method if one doesn't want this task to be shut down if the parent shuts down. | |
| virtual void | Exit () |
| Terminate myself. Exit code is INOS_OK or the code previously set with SetExitCode. | |
| virtual void | Exit (uint32 auExitCode) |
| Terminate myself. More... | |
| virtual void | SetExitCode (uint32 auExitCode) |
| Set exit code. More... | |
| virtual uint32 | GetExitCode () |
| Get exit code. | |
| virtual bool | CheckShutdown () |
| Check if a shutdown is pending. More... | |
| virtual void | SetSuspendHook (void *apSuspendHook) |
| Set Suspend hook. More... | |
| virtual void | ClrSuspendHook () |
| Clear Suspend hook. | |
| virtual void * | GetSuspendHook () |
| Get Suspend hook if any. | |
| INOS_INLINE ETskType | GetTskType () |
| Get task type. | |
| INOS_INLINE ETskType | SetTskType (ETskType aeType) |
| Set task type. | |
Static Public Member Functions | |
| static CINOSSioTftExp * | Find (const char *apExplorer) |
| static void | MakeFloatValue (char *apBuf, void *apValue, char acFormat, uint16 auDigits) |
| Format float value (for no-float targets). More... | |
| static uint32 | ReplaceNewLines (char *apText, uint32 auSize, bool abEscaping) |
| Replace ' ' in a string with '|' for display, give count of newlines. More... | |
| static void | AppendSpaces (char *apText, uint32 auSize) |
| Appends spaces to a string to fill the remaining part of the buffer. More... | |
Static Public Attributes | |
| static CINOSMutex | m_mMutex |
| Make CINOSSioTftExp thread safe. | |
Protected Member Functions | |
| void | Init () |
| Init explorer depending on display size. | |
| uint32 | GetRows (STFTFontInfo &arInfo) |
| Get number of rows for this font. More... | |
| uint32 | GetColumns (STFTFontInfo &arInfo) |
| Get number of columns for this font. More... | |
| uint32 | ShowTab (CINOSSioTftExpTab *apTab, uint32 auLevel) |
| Show tab with all elements. More... | |
| uint32 | ShowTabFix (CINOSSioTftExpTab *apTab, uint32 auLevel) |
| Show tab with all elements. More... | |
| void | ShowProcs (CINOSSioTftExpTab *apTab) |
| Show procedures of given tab. More... | |
| void | ShowProcsFix (CINOSSioTftExpTab *apTab) |
| Show procedures of given tab. More... | |
| void | ShowVars (uint32 auCoordY, CINOSSioTftExpTab *apTab, bool abNames=false) |
| Show vars, values with/without names. More... | |
| void | ShowVarsFix (CINOSSioTftExpTab *apTab, bool abNames=false) |
| Show vars, values with/without names at fixed positions. More... | |
| void | TextOut (uint16 auCoordX, uint16 auCoordY, char *pText, STFTFontInfo &arFontInfo, int16 aiStrLength=-1, uint32 auFlags=0) |
| Print a text with given font at given coordinates. More... | |
| void | TextOutFix (uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY, EBlockTextAlignment aeBlockAlignment, char *apText, STFTFontInfo &arFontInfo, int16 aiStrLength=-1, uint32 auFlags=0) |
| void | ResetDisplay () |
| Reset display, necessary after link problems. | |
| CINOSSioTftExp * | GetNext () |
| Get next explorer inlist. More... | |
| void | HandleCommands () |
| Handle user commands and display events (key presses). | |
| virtual void | Action () override |
| Main task function. | |
| void | ActivateFirstChild () |
| Recursively activate the first child of the active tab. | |
| void | ProcessLangFile (char *apFile) |
| Terminate all strings with 0 so they can be used directly. More... | |
| void | HandleHardcopy () |
| Handle hardcopy request. | |
Protected Attributes | |
| CINOSSioTftExp * | m_pNext |
| Next explorer in list. | |
| CINOSSioTft * | m_pSioTft |
| Pointer to display that outputs all our stuff. | |
| CINOSSioTftExpTab * | m_pTopTab |
| Pointer to upmost tab that holds the rest (never displayed). | |
| CINOSSioTftExpTab * | m_pActiveTab |
| Pointer to active tab that is shown with variables. | |
| CTFTIncoMember * | m_pActiveVar |
| Pointer to active var that is selected for editing. | |
| CINOSSemaphore | m_CKeySemaphore |
| Semaphore to handle key presses and other actions. | |
| const char * | m_pConfig |
| Name of explorer config. | |
| uint16 | m_uLangCount |
| Number of available language files. | |
| const char ** | m_ppLangFile |
| Pointers to processed language file texts. | |
| const char ** | m_ppLangFileEnd |
| Pointers to end of language file texts. | |
| const char ** | m_ppLangFiles |
| Pointers to available language file names. | |
| STouchButton | m_DefButton |
| Default button definition. | |
| CINOSSioTftExpTab * | m_pVisibleTabs [256] |
| Mapping of all possible return values to the currently visible tabs. | |
| CTFTIncoMember * | m_TouchMembers [16] |
| CINOSTime | m_ThrobberTime |
| Timer for selecting next throbber image. | |
| STFTFontInfo | m_TabFont |
| Font definition for tab buttons. | |
| STFTFontInfo | m_VarFont |
| Font definition for members (variables). | |
| STFTFontInfo | m_VarFontBig |
| Font definition for big members (variables). | |
| STFTFontInfo | m_ProcFont |
| Font definition for procedure buttons. | |
| uint16 | m_uWidth |
| Width of display. | |
| uint16 | m_uHeight |
| Height of display. | |
| uint16 | m_uTopDivider |
| Line of top divider (may be different on every tab). | |
| uint16 | m_uBottomDivider |
| Line of bottom divider. | |
| uint8 | m_uActLanguage |
| Index of actual language. | |
| uint8 | m_uUserLevel |
| User level for editing variables. | |
| uint8 | m_uVarColumns |
| Columns of display. | |
| uint8 | m_uValueColumn |
| Column where values start. | |
| uint8 | m_uUnitColumn |
| Column where units start. | |
| uint8 | m_uTabBtnSize |
| General size for tab buttons. | |
| uint8 | m_uProcBtnSize |
| General size for procedure buttons. | |
| uint8 | m_uThrobber |
| Index of throbber picture. | |
| uint8 | m_uThrobberSize |
| Minimal space required for throbber (excluded from procedures) | |
| STFTHardcopy | m_HardCopyInstruction |
| Hardcopy command settings. | |
| uint32 | m_uFlags |
| General flags. | |
| uint32 | m_uUserKeys |
| Pattern of pressed user (matrix) keys. | |
| uint32 | m_uTime |
| Metering time how much we needed to handle events. | |
| const char * | m_pTFTProject |
| The name of the display project. | |
| const char * | m_pMacroFile |
| The name of the macro file containing display bitmaps, fonts etc. | |
| InitDoneFunc | m_pInitDoneCallback |
| Callback for init done notification. | |
| void * | m_pInitDoneContext |
| Context for init done notification. | |
| OnTabChangeFunc | m_pTabChangeCallback |
| Callback for init done notification. | |
| void * | m_pTabChangeContext |
| Context for init done notification. | |
Static Protected Attributes | |
| static CINOSSioTftExp * | m_pFirst |
| Start of linked list of explorers. | |
Friends | |
| class | CINOSSioTftExpTab |
| class | CTFTIELuint8 |
Additional Inherited Members | |
Public Types inherited from CINOSTask | |
| enum | ETskType { eTskTypeBoot = 0, eTskTypeResource = 1, eTskTypeSystem = 2, eTskTypeApplication = 3, eTskTypeCommunication = 4, eTskTypeRealtime = 5, eTskTypeInterrupt = 6, eTskTypeBackground = 7, eTskTypeLua = 8, eTskTypeTest = 9, eTskTypeReserved0 = 10, eTskTypeReserved1 = 11, eTskTypeUser0 = 12, eTskTypeUser1 = 13, eTskTypeUser2 = 14, eTskTypeUser3 = 15 } |
| Task types. | |
Main inco explorer class for TFT display.
This class shows all tabs and variables and reacts to key presses. A user can navigate through tabs and variables and edit the variables if allowed to.
| CINOSSioTftExp::CINOSSioTftExp | ( | const char * | acName, |
| CINOSSioTft * | apDisplay, | ||
| const char * | acConfig | ||
| ) |
Constructor.
| acName | Name of the explorer task. |
| apDisplay | Display to work with. |
| acConfig | Name of the explorer config file |
|
static |
Appends spaces to a string to fill the remaining part of the buffer.
| apText | Text to append spaces (inplace). |
| auSize | Size of buffer |
| void CINOSSioTftExp::GetActualTab | ( | char * | apTab, |
| uint32 | auLength, | ||
| bool | abFullPath = false |
||
| ) |
Get currently selected tab.
| apTab | Buffer to receive the name. |
| auLength | Maximum length to write into buffer. |
| abFullPath | True if the full path is desired |
| void CINOSSioTftExp::GetActualVar | ( | char * | apVar, |
| uint32 | auLength | ||
| ) |
Get default name of currently selected variable.
| apTab | Buffer to receive the name. |
| auLength | Maximum length to write into buffer. |
| void CINOSSioTftExp::GetActualVarLang | ( | char * | apVar, |
| uint32 | auLength | ||
| ) |
Get actual selected variable in selected language.
| apTab | Buffer to receive the name. |
| auLength | Maximum length to write into buffer. |
| void CINOSSioTftExp::GetActualVarValue | ( | char * | apVal, |
| uint32 | auLength | ||
| ) |
Get value of actual selected variable.
| apTab | Buffer to receive the name. |
| auLength | Maximum length to write into buffer. |
|
inlineprotected |
Get number of columns for this font.
| arInfo | Object that provides info about font. |
|
inline |
Get internal flags (e.g. shift mode).
| const char* CINOSSioTftExp::GetLangFileName | ( | uint32 | auLangIndex | ) | const |
Check if language file by index available.
| uint32 CINOSSioTftExp::GetLanguage | ( | ) |
Get selected language to display.
|
inlineprotected |
Get next explorer inlist.
|
inline |
Get pattern of pressed user keys (matrix).
|
inlineprotected |
Get number of rows for this font.
| arInfo | Object that provides info about font. |
|
inline |
To get the top tab pointer.
| void CINOSSioTftExp::HardCopy | ( | int16 | aiXX1 = -1, |
| int16 | aiYY1 = -1, |
||
| int16 | aiXX2 = -1, |
||
| int16 | aiYY2 = -1, |
||
| bool | abUseRLE = true |
||
| ) |
Do a hard copy (screenshot) of current screen
| aiXX1 | X-coordinate of upper left corner (default: full screen) |
| aiYY1 | Y-coordinate of upper left corner (default: full screen) |
| aiXX2 | X-coordinate of lower right corner (default: full screen) |
| aiYY2 | Y-coordinate of lower right corner (default: full screen) |
| abUseRLE | Use RLE compression (default: true = yes) |
|
static |
Format float value (for no-float targets).
| apBuf | Buffer to receive formatted value. |
| apValue | Address of numeric value. |
| acFormat | Desired format for formatting. |
| auDigits | Number of digits in formatting. |
|
protected |
Terminate all strings with 0 so they can be used directly.
| apFile | Text to process, should be 0 terminated. |
|
static |
Replace '
' in a string with '|' for display, give count of newlines.
| apText | Text to fix (inplace). |
| auSize | Maximum size of buffer if fixed text needs more space. |
| abEscaping | Flag if more escaping of 'dangerous' chars is needed. |
| void CINOSSioTftExp::SelLanguage | ( | uint32 | auLangIndex | ) |
Select language to display.
| auIndex | Language index for names. |
| void CINOSSioTftExp::SetActualTab | ( | char * | apTab | ) |
Set current tab.
| apTab | Name of tab to select as 'PTab1.PTab2.MyTab'. |
| void CINOSSioTftExp::SetTabCharacteristics | ( | const char *const | acTabPath, |
| uint32 | auCharacteristics, | ||
| ETFTCharCmd | aeCmd | ||
| ) |
Set (add/remove) characteristics of a tab.
| acTabPath | Path of tab to change. |
| auCharacteristics | Characteristics to apply. |
| aeCmd | Command to execute (set/add/clear). |
| void CINOSSioTftExp::SetUserLevel | ( | uint32 | auLevel | ) |
Set user level.
| auLevel | Level to allow variable edits. |
| bool CINOSSioTftExp::SetVarCharacteristics | ( | const char *const | acVarPath, |
| uint32 | auCharacteristics, | ||
| ETFTCharCmd | aeCmd | ||
| ) |
Set (add/remove) characteristics of a variable.
| acVarPath | Path of variable to change. |
| auCharacteristics | Characteristics to apply. |
| aeCmd | Command to execute (set/add/clear). |
|
protected |
Show procedures of given tab.
| apTab | Tab to show procedures of. |
|
protected |
Show procedures of given tab.
| apTab | Tab to show procedures of. |
|
protected |
Show tab with all elements.
| apTab | Tab to show. |
| auLevel | Nesting level to know Y coord of tabs on display. |
|
protected |
Show tab with all elements.
| apTab | Tab to show. |
| auLevel | Nesting level to know Y coord of tabs on display. |
|
protected |
Show vars, values with/without names.
| auCoordY | Y coordinate of first variable |
| apTab | Tab to show variables of. |
| abNames | Flag to also write names or only values. |
|
protected |
Show vars, values with/without names at fixed positions.
| apTab | Tab to show variables of. |
| abNames | Flag to also write names or only values. |
|
protected |
Print a text with given font at given coordinates.
| auCoordX | X coordinate of start position of text. |
| auCoordY | Y coordinate of start position of text. |
| pText | Text to print. |
| arFontInfo | Information about used font. |
| aiStrLength | Maximum string length (if apText is longer). |
| auFlags | Additional flags (stretched) |
| bool CINOSSioTftExp::UpdateInco | ( | ) |
Update inco item pointers of items e.g. after new registrations.