Difference between revisions of "Unit Shell"

From Ultibo.org
Jump to: navigation, search
Line 10: Line 10:
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shell specific constants''' <code> SHELL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SHELL_LINE_END = Chr(13) + Chr(10); {CR LF}</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SHELL_DEFAULT_BANNER = 'Ultibo Core (Release: ' + ULTIBO_RELEASE_NAME + ' Version: ' + ULTIBO_RELEASE_VERSION + ' Date: ' + ULTIBO_RELEASE_DATE + ')';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_DEFAULT_PROMPT = '>';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_DEFAULT_ERROR = 'Huh?';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shell flag constants''' <code> SHELL_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SHELL_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SHELL_FLAG_CLEAR = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_FLAG_SIZE = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_FLAG_CURSOR = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_FLAG_COLORS = $00000008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_FLAG_COORDINATES = $00000010;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shell session flag constants''' <code> SHELL_SESSION_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SHELL_SESSION_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shell command flag constants''' <code> SHELL_COMMAND_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SHELL_COMMAND_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_FLAG_HIDDEN = $00000001;</code>
 +
| Hidden command, do not show in HELP or INFO
 +
|-
 +
| <code>SHELL_COMMAND_FLAG_HELP = $00000002;</code>
 +
| Command has HELP available
 +
|-
 +
| <code>SHELL_COMMAND_FLAG_INFO = $00000004;</code>
 +
| Command has INFO available
 +
|-
 +
| <code>SHELL_COMMAND_FLAG_DEFAULT = $00000008;</code>
 +
| Default command, pass unknown commands to this before showing error
 +
|-
 +
| <code>SHELL_COMMAND_FLAG_EXTENDED = $00000008;</code>
 +
| Extended command, pass command name to command for extended handling
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shell alias flag constants''' <code> SHELL_ALIAS_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SHELL_ALIAS_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_ALIAS_FLAG_HIDDEN = $00000001;</code>
 +
| Hidden alias, do not show in HELP or INFO
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shell command constants''' <code> SHELL_COMMAND_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SHELL_COMMAND_HELP = 'HELP';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_INFO = 'INFO';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_VER = 'VER';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_TIME = 'TIME';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_CLS = 'CLS';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_RESTART = 'RESTART';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_SHUTDOWN = 'SHUTDOWN';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_CPU = 'CPU';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_UPTIME = 'UPTIME';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_WORKER = 'WORKER';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_THREAD = 'THREAD';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_MEMORY = 'MEMORY';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_COMMAND_DEVICE = 'DEVICE';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shell alias constants''' <code> SHELL_ALIAS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SHELL_ALIAS_HELP = '?';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SHELL_ALIAS_VERSION = 'VERSION';</code>
 +
| &nbsp;
 +
|-
 +
| <code>SHELL_ALIAS_CLEAR = 'CLEAR';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Shell logging constants''' <code> SHELL_LOG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SHELL_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code>
 +
| Shell debugging messages
 +
|-
 +
| <code>SHELL_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code>
 +
| Shell informational messages
 +
|-
 +
| <code>SHELL_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 +
| Shell error messages
 +
|-
 +
| <code>SHELL_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
 +
| No Shell messages
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===

Revision as of 04:39, 25 November 2016

Return to Unit Reference


Description


To be documented

Constants



[Expand]
Shell specific constants SHELL_*


[Expand]
Shell flag constants SHELL_FLAG_*


[Expand]
Shell session flag constants SHELL_SESSION_FLAG_*


[Expand]
Shell command flag constants SHELL_COMMAND_FLAG_*


[Expand]
Shell alias flag constants SHELL_ALIAS_FLAG_*


[Expand]
Shell command constants SHELL_COMMAND_*


[Expand]
Shell alias constants SHELL_ALIAS_*


[Expand]
Shell logging constants SHELL_LOG_*


Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

[Expand]
procedure ShellInit;
Description: To be documented


Shell functions

[Expand]
function ShellGetShell(APrevious:TShell; ALock,AUnlock:Boolean):TShell;
Description: To be documented


[Expand]
function ShellFindShell(const AName:String):TShell;
Description: To be documented


[Expand]
function ShellRegisterShell(AShell:TShell):Boolean;
Description: To be documented


[Expand]
function ShellDeregisterShell(AShell:TShell):Boolean;
Description: To be documented


[Expand]
function ShellGetCommand(APrevious:TShellCommand; ALock,AUnlock:Boolean):TShellCommand;
Description: To be documented


[Expand]
function ShellFindCommand(const AName:String):TShellCommand;
Description: To be documented


[Expand]
function ShellRegisterCommand(ACommand:TShellCommand):Boolean;
Description: To be documented


[Expand]
function ShellDeregisterCommand(ACommand:TShellCommand):Boolean;
Description: To be documented


Shell helper functions

[Expand]
procedure ShellLog(Level:LongWord; const AText:String);
Description: To be documented


[Expand]
procedure ShellLogInfo(const AText:String);
Description: To be documented


[Expand]
procedure ShellLogError(const AText:String);
Description: To be documented


[Expand]
procedure ShellLogDebug(const AText:String);
Description: To be documented


Return to Unit Reference