Difference between revisions of "Unit Shell"

From Ultibo.org
Jump to: navigation, search
Line 36: Line 36:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''Shell flag''' <code> SHELL_FLAG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 62: Line 62:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''Shell session flag''' <code> SHELL_SESSION_FLAG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 73: Line 73:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''Shell command flag''' <code> SHELL_COMMAND_FLAG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 99: Line 99:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''Shell alias flag''' <code> SHELL_ALIAS_FLAG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 113: Line 113:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''Shell command''' <code> SHELL_COMMAND_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 160: Line 160:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''Shell alias''' <code> SHELL_ALIAS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 177: Line 177:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 style="font-size: 14px; padding-left: 12px;">'''Shell logging''' <code> SHELL_LOG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 1,190: Line 1,190:
 
|-
 
|-
 
| <code>SHELL_DEFAULT_LOG_LEVEL:LongWord = SHELL_LOG_LEVEL_DEBUG;</code>
 
| <code>SHELL_DEFAULT_LOG_LEVEL:LongWord = SHELL_LOG_LEVEL_DEBUG;</code>
| style="width: 65%;"|Minimum level for Shell messages. Only messages with level greater than or equal to this will be printed.
+
| style="width: 40%;"|Minimum level for Shell messages. Only messages with level greater than or equal to this will be printed.
 
|-
 
|-
 
|}
 
|}
Line 1,196: Line 1,196:
 
|-
 
|-
 
| <code>SHELL_LOG_ENABLED:Boolean;</code>
 
| <code>SHELL_LOG_ENABLED:Boolean;</code>
| style="width: 65%;"|
+
| style="width: 40%;"|
 
|-
 
|-
 
|}
 
|}

Revision as of 03:47, 27 March 2017

Return to Unit Reference


Description


Ultibo Generic Shell unit

To be documented

Constants



[Expand]
Shell specific constants SHELL_*


[Expand]
Shell flag SHELL_FLAG_*


[Expand]
Shell session flag SHELL_SESSION_FLAG_*


[Expand]
Shell command flag SHELL_COMMAND_FLAG_*


[Expand]
Shell alias flag SHELL_ALIAS_FLAG_*


[Expand]
Shell command SHELL_COMMAND_*


[Expand]
Shell alias SHELL_ALIAS_*


[Expand]
Shell logging SHELL_LOG_*


Type definitions


None defined

Class definitions



Shell manager

[Expand]

TShellManager = class(TObject)

Shell

[Expand]

TShell = class(TListObject)

Shell session

[Expand]

TShellSession = class(TListObject)

Shell command

[Expand]

TShellCommand = class(TListObject)

Shell alias

[Expand]

TShellAlias = class(TListObject)

Shell command help

[Expand]

TShellCommandHelp = class(TShellCommand)

Shell command information

[Expand]

TShellCommandInfo = class(TShellCommand)

Shell command version

[Expand]

TShellCommandVer = class(TShellCommand)

Shell command time

[Expand]

TShellCommandTime = class(TShellCommand)

Shell command clear

[Expand]

TShellCommandClear = class(TShellCommand)

Shell command restart

[Expand]

TShellCommandRestart = class(TShellCommand)

Shell command shutdown

[Expand]

TShellCommandShutdown = class(TShellCommand)

Shell command uptime

[Expand]

TShellCommandUptime = class(TShellCommand)

Shell command threads

[Expand]

TShellCommandThreads = class(TShellCommand)

Shell command memory

[Expand]

TShellCommandMemory = class(TShellCommand)

Shell command devices

[Expand]

TShellCommandDevices = class(TShellCommand)


Public variables



Shell logging

SHELL_DEFAULT_LOG_LEVEL:LongWord = SHELL_LOG_LEVEL_DEBUG; Minimum level for Shell messages. Only messages with level greater than or equal to this will be printed.
SHELL_LOG_ENABLED:Boolean;


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