Unit GlobalConfig

From Ultibo.org
Revision as of 00:25, 28 January 2016 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


The GlobalConfig unit contains variables used throughout Ultibo core to provide configuration and parameters to common modules and sub systems. Many of these variables may also be passed on the command line as environment variables to customize the behavior of Ultibo core without needing to recompile the application. This unit also includes a small number of widely used common functions.

Constants


None defined

Type definitions


None defined

Public variables


To be documented

GetLastErrorHandler:TGetLastError; - Registered handler for the global GetLastError function
SetLastErrorHandler:TSetLastError; - Registered handler for the global SetLastError function

Function declarations


function Min(A,B:LongInt):LongInt; - Return the minimum value of A and B
function Max(A,B:LongInt):LongInt; - Return the maximum value of A and B
function RoundUp(Value,Multiple:LongWord):LongWord; - Round Value to the next highest multiple of Multiple
function RoundDown(Value,Multiple:LongWord):LongWord; - Round Value to the next lowest multiple of Multiple
function HIWORD(L:LongInt):Word; - Return the high word of L
function LOWORD(L:LongInt):Word; - Return the low word of L
function HIBYTE(W:LongInt):Byte; - Return the high byte of W
function LOBYTE(W:LongInt):Byte; - Return the low byte of W
function MAKELONG(A,B:LongInt):LongInt; - Make a longword value from A and B
function MAKEWORD(A,B:LongInt):Word; - Make a word value from A and B
function WordNtoBE(Value:Word):Word; - Convert word Value from native to big endian
function WordBEtoN(Value:Word):Word; - Convert word Value from big endian to native
function LongWordNtoBE(Value:LongWord):LongWord; - Convert longword Value from native to big endian
function LongWordBEtoN(Value:LongWord):LongWord; - Convert longword Value from big endian to native
function Int64NtoBE(const Value:Int64):Int64; - Convert int64 Value from native to big endian
function Int64BEtoN(const Value:Int64):Int64; - Convert int64 Value from big endian to native
function GetLastError:LongWord; - Return the last error code for the current thread
procedure SetLastError(LastError:LongWord); - Set the last error code for the current thread


function ErrorToString(Error:LongWord):String; - Convert an error code value to a string
function SysErrorToString(ErrorCode:Integer):String; - Convert an error code value to a string (RTL)
function BooleanToString(Value:Boolean):String; - Convert a boolean value to a string
function CPUTypeToString(CPUType:LongWord):String; - Convert a CPU type constant to a string
function CPUModelToString(CPUModel:LongWord):String; - Convert a CPU model constant to a string
function CPUIDToString(CPUID:LongWord):String; - Convert a CPU ID constant to a string
function FPUTypeToString(FPUType:LongWord):String; - Convert a FPU type constant to a string
function GPUTypeToString(GPUType:LongWord):String; - Convert a GPU type constant to a string
function CacheTypeToString(CacheType:LongWord):String; - Convert a filesystem Cache type constant to a string
function BoardTypeToString(BoardType:LongWord):String; - Convert a Board type constant to a string
function MachineTypeToString(MachineType:LongWord):String; - Convert a Machine type constant to a string
function PowerIDToString(PowerID:LongWord):String; - Convert a Power ID constant to a string
function PowerStateToString(PowerState:LongWord):String; - Convert a Power state constant to a string
function ClockIDToString(ClockID:LongWord):String; - Convert a Clock ID constant to a string
function ClockStateToString(ClockState:LongWord):String; - Convert a Clock state constant to a string
function TurboIDToString(TurboID:LongWord):String; - Convert a Turbo ID constant to a string
function VoltageIDToString(VoltageID:LongWord):String; - Convert a Voltage ID constant to a string
function TemperatureIDToString(TemperatureID:LongWord):String; - Convert a Temperature ID constant to a string
function LogLevelToLoggingSeverity(LogLevel:LongWord):LongWord; - Convert a log level constant to a severity level


Return to Unit Reference