Funktionsammlung: Unterschied zwischen den Versionen

Aus LOTUS Wiki DE
Wechseln zu: Navigation, Suche
de_>DrBlackError
Keine Bearbeitungszusammenfassung
 
K (1 Version importiert: Init)
(kein Unterschied)

Version vom 23. Oktober 2023, 22:03 Uhr

Nachfolgend eine Liste mit Beschreibungen aller in LOTUS verfügbaren Script-Funktionen.

Basic

Initialize
InitializeAfterConstSet
SimStep
SimStep_LOD
Initialize_RC
SimStep_RC
Finalize_RC
Finalize
OnButton(id: string; value: boolean; cockpitIndex: byte)
OnFloatInput(id: string; value: single; cockpitIndex: integer)

Standardfunktionen

Min(X, Y)
Max(X, Y)
IntMin(A, B)
IntMax(A, B)
Abs(X)
Sign(X)
Sqr(X)
Sqrt(X)
Exp(X)
Ln(X)
Power(base, exponent)
Sin(X)
Cos(X)
Tan(X)
ArcSin
ArcCos
ArcTan
Random

Strings

UChar(id: word)
RemSpacesBeginEnd(text: string)
StrGrThan(A, B: string)
StrSmThan(A, B: string)
StrCutBegin(text: string; n: integer)
StrCutEnd(text: string; n: integer)
StrSetLenL(text: string; n: integer)
StrSetLenC(text: string; n: integer)
StrSetLenR(text: string; n: integer)
RegEx(Input: string; Pattern: string)
RegExReplace(Input: string; Pattern: string; Replacement: string)

Typenkonvertierung

Trunc
Round
IntToStr
StrToInt
FloatToStr
StrToFloat
IntToStrEnh(value: integer; n: integer; fill: string)
DecodeDateFullyGetLeap(const DateTime: single; var Year, Month, Day, DOW: Word)

Trigger

SendMessageToTrigger(Self; ID: string; value: string; sensor_index: integer)
OnEnterLeaveTrigger(triggerid: string; entering: boolean; sensorindex: integer)
SendEvent(self: integer; id: string; value: integer)

Module

SendMessageToChildSingle(self: integer; slotindex: integer; messageId: string; value: single)
SendMessageToChildString(self: integer; slotindex: integer; messageId: string; value: string)
SendMessageToChildInteger(self: integer; slotindex: integer; messageId: string; value: integer)
SendMessageToChildBoolean(self: integer; slotindex: integer; messageId: string; value: boolean)
SendMessageToParentSingle(self: integer; id: string; value: single)
SendMessageToParentString(self: integer; id: string; value: string)
SendMessageToParentInteger(self: integer; id: string; value: integer)
SendMessageToParentBoolean(self: integer; id: string; value: boolean)
ReceiveMessageFromChildSingle(slotindex: integer; id: string; value: single)
ReceiveMessageFromChildString(slotindex: integer; id: string; value: string)
ReceiveMessageFromChildInteger(slotindex: integer; id: string; value: integer)
ReceiveMessageFromChildBoolean(slotindex: integer; id: string; value: boolean)
ReceiveMessageFromParentSingle(indexOfClass: integer; id: string; value: single)
ReceiveMessageFromParentString(indexOfClass: integer; id: string; value: string)
ReceiveMessageFromParentInteger(indexOfClass: integer; id: string; value: integer)
ReceiveMessageFromParentBoolean(indexOfClass: integer; id: string; value: boolean)
SendBroadcastSingle(self: integer; busId: string; id: string; value: single)
SendBroadcastString(self: integer; busId: string; id: string; value: string)
SendBroadcastInteger(self: integer; busId: string; id: string; value: integer)
ReceiveBroadcastSingle(busId: string; id: string; value: single)
ReceiveBroadcastString(busId: string; id: string; value: string)
ReceiveBroadcastInteger(busId: string; id: string; value: integer)
SetModule(self: integer; slotindex: integer; userID, contentSubID: integer)
GetModuleSet(self: integer; slotindex: integer): boolean

Kupplung

SendToECouplerSingle(self: integer; id: string; value: single; couplingindex: integer)
SendToECouplerString(self: integer; id: string; value: string; couplingindex: integer)
SendToECouplerInteger(self: integer; id: string; value: integer; couplingindex: integer)
SendToECouplerBoolean(self: integer; id: string; value: boolean; couplingindex: integer)
CoupleBroadcastBus(self: integer; busID: string; couplingindex: byte)
UncoupleBroadcastBus(self: integer; busID: string; couplingindex: byte)

FIS (allgemein)

PIS_GetITCSServer(self: integer): string
PIS_GetStationMainListIndexByTerminusCode(self: integer; code: integer): integer
PIS_GetStationStdString(self: integer; stationmainlistindex: integer; stringindex: integer): string
PIS_GetSpecialChar(self: integer; code: integer; lineinput: string): string
PIS_GetRouteIndexByCode(self: integer; line, code: integer): integer
PIS_GetRouteString(self: integer; routeindex: integer): string
PIS_GetRouteSpecialCharCode(self: integer; routeindex: integer): integer
PIS_GetRouteStopCount(self: integer; routeindex: integer): integer
PIS_GetRouteStopCode(self: integer; routeindex: integer; stopindex: integer): integer
PIS_GetRouteTerminusCode(self: integer; routeindex: integer; stopindex: integer): integer
PIS_GetRouteFollowingCode(self: integer; routeindex: integer; out line: integer; out code: integer)
PIS_LineRouteCount(self: integer; line: integer): integer;
PIS_GetStationCode(self: integer; stationmainlistindex: integer): integer;
PIS_GetRouteLine(self: integer; routeindex: integer): integer;
PIS_GetRouteCode(self: integer; routeindex: integer): integer;
PIS_GenerateTempRouteListByLine(self: integer; line: integer): integer;
PIS_SortTempRouteList(self: integer);
PIS_GetTempRouteListCount(self: integer): integer;
PIS_GetTempRouteListItemIndex(self: integer; templistindex: integer): integer;
PIS_GetStationID(self: integer; stationmainlistindex: integer): string

FIS (speziell)

PISSP_GetIndexByClass(self: integer; classid: string): integer
PISSP_SetByIndex(self: integer; index: integer)
PISSP_GetGroupString(self: integer; stringindex: integer): string
PISSP_GetStationString(self: integer; stncode: integer; stringindex: integer): string
PISSP_GetRouteString(self: integer; routelinecode, routecode: integer; stringindex: integer): string
PISSP_GetRouteStopString(self: integer; routelinecode, routecode: integer; stopindex: integer; stringindex: integer): string

Fahrplan

TimetableGetWayIndex(self: integer; itcsServer: string; line: string; route: string): integer
TimetableGetTripAndTourIndexByLineCourseDate(self: integer; itcsServer: string; line: string; course: string; date, time: single; out iTimetable, iTrip, iTourplan, iTour, iTourtrip: integer)
TimetableGenerateTempTripListByTour(self: integer; timetableIndex: integer; iTourplan, iTour: integer)
TimetableGetTempTripListCount(self: integer): integer
TimetableGetTripInfoByTempListIndex(self: integer; templistindex: integer; out line: string; out course: string; out route: string; out tripIndex: integer; out depTime: single)
TimetableGenerateTempStnListByTrip(self: integer; timetableIndex: integer; tripIndex: integer)
TimetableGetTempStnListCount(self: integer): integer
TimetableGetInfoByTempStnListIndex(self: integer; templistindex: integer; out FIS_ID: string; out arrTime: single; out depTime: single)
TimetableGetWayIndex(self: integer; scope: integer; line: string; route: string): integer
TimetableAtSectionOfWay(self: integer; wayindex: integer): integer
TimetableAtBusstopOfWay(self: integer; wayindex, sectionindex: integer; out stopID: string): boolean
TimetableDistBetweenStns(self: integer; wayindex: integer; startStn, endStn: string): single

Fahrplan (DFIs)

StatPIS_Login(Self: integer; stationname, trackname: string)
StatPIS_GenerateTempDataList(Self: integer; timespan_d: single)
StatPIS_GetTempDataCount(Self: integer): integer
StatPIS_GetLineTerminusByTempListIndex(Self: integer; templistindex: integer; out line, terminus: string)
StatPIS_GetArrTimeByTempListIndex(Self: integer; templistindex: integer; out arrTime, arrTimeDelta: single)
StatPIS_GetDepTimeByTempListIndex(Self: integer; templistindex: integer; out depTime, depTimeDelta: single)
StatPIS_GetInfotext(Self: integer): string

Farben

Color(r,g,b,a: byte)
Red(col: byte)
Green(col: byte)
Blue(col: byte)
Alpha(col: byte)

Texturen

GetTextureIndex(userID, contentSubID: integer)

Script-Texturen

TexSelTex(Self; id: integer)
TexSetColor(self: integer; col: cardinal)
TexSetBlendMode(self: integer; mode: byte)
TexClear(self: integer)
TexDrawPixel(self: integer; x, y: word)
TexDrawRect(self: integer; x1, y1, x2, y2: word)
TexReadPixelColor(self: integer; x, y: word): cardinal
TexGetFontIndex(self: integer; fontUserID, fontSubID: integer): integer
TexWriteLn(self: integer; text: string; x, y: integer; fontindex: integer; fullcolor: boolean; addSpaces: byte)
TexGetTextLenPixel(self: integer; text: string; fontindex: integer): integer
TexCopy(self: integer; sourceId, targetId: integer; x1,y1,x2,y2,targetX,targetY: integer; scalingfactor: integer; sourceColor, targetColor: cardinal)

Force Feedback

SetForceFeedbackCenterforce(axisID: string; coeficient, saturation, offset: single)
SetForceFeedbackFriction(axisID: string; coeficient: single)
SetForceFeedbackVibration(axisID: string; magnitude, period: single)

Sounds

SndSetIndependant(Self, Soundname, Soundindex innerhalb der Soundquelle, ContentUserID, ContentSubID)

Datum & Uhrzeit

DecodeDateFullyGetLeap(const DateTime: single; var Year, Month, Day, DOW: Word): Boolean

Stückweise lineare Funktionen

LinFuncGetValue(id: string, x: integer)