Sei sulla pagina 1di 8

General CAPL Functions Page 1 of 8

Topic search

General CAPL Functions


CAPL Function Overview » General CAPL Functions

Quick Access
General Functions Flow Control Time Management
Access to Hardware Language Support and Trigonometric and Mathematical
Debugging Functions
Access to CANoe Variables and Logging Functions User Interactions
Panels
AUTOSAR PDU Replay Functions
Byte Swapping (Intel/Motorola) Standalone Mode
File Functions String Functions

General Functions [▲ back]

Functions Short Description


CompleteStop Indicates completion of pre-stop activities after
a measurement stop has been deferred.
DeferStop Defers a measurement stop so that activities
can be completed before the stop takes effect.
getConfigurationName Returns the file name of the currently loaded
configuration without extension.
GetComputerName Retrieves the fully qualified name of the
computer.
GetEventSortingStatus Determines the Event Sorting state.
GetIPAddress Retrieves the default (first) IP address of the
computer as a string.
gmLanGetPID Gets the parameter ID of the message.
gmLanGetPrio Gets the priority of the message.
gmLanGetSourceId Gets the source address of the message.
gmLanId Creates a message ID for a GMLAN message.
gmLanSetPID Sets the parameter ID of the message.
gmLanSetPrio Sets the priority of the message.
gmLanSetSourceId Sets the source address of the message.
interpretAsDouble Interpret the actual bytes of a value as if the
value was of another data type.
interpretAsDword
interpretAsFloat
interpretAsQword
isStatisticAcquisitionRunning Tests whether an acquisition range has already
been started.

mk:@MSITStore:C:\Program%20Files\Vector%20CANalyzer%209.0\Help01\CAPLfuncti... 1/25/2018
General CAPL Functions Page 2 of 8

startStatisticAcquisition Starts a new acquisition range.


stopStatisticAcquisition Stops a started acquisition range.
traceSetEventColors Sets the font, and background color for the
message display in the Trace Window.

Access to Hardware [▲ back]

Functions Short Description


InterfaceStatus The callback occurs when the status of the
connection to the interface hardware is
changed.
xlAcquireLED Acquires the specified LEDs of a hardware
device.
xlReleaseLED Releases specified LEDs.
xlSetLED Sets specified LEDs.

Access to CANoe Variables and Panels [▲ back]

Functions Short Description


ClockControlReset Resets the Clock Control designed as stop
watch in the Panel Designer.
ClockControlStart Starts the Clock control designed as stop watch
in the Panel Designer.
ClockControlStop Stops the Clock Control designed as stop watch
in the Panel Designer.
closePanel Closes a panel.
DeleteControlContent Deletes the content of the Panel Designer
CAPLOutputView control.
enableControl Selective activation and deactivation of special
elements.
MakeRGB Calculates the color value from the three
primary color components.
MakeARGB Calculates the color value from the alpha value
and the three primary color components.
openPanel Opens a panel.
putValueToControl Assigns the value to the multi display.
SetClockControlTime Sets the time of the Panel Designer clock
control.
SetControlBackColor Sets the background color of panel elements.
SetControlColors Sets the background and text color of panel
elements.
SetControlForeColor Sets the text (foreground) color of panel
elements.
SetControlProperty Sets a property of an Panel Editor ActiveX

mk:@MSITStore:C:\Program%20Files\Vector%20CANalyzer%209.0\Help01\CAPLfuncti... 1/25/2018
General CAPL Functions Page 3 of 8

control.
SetControlVisibility Sets the visibility of a panel element.
SetDefaultControlColors Sets the background and text color of panel
elements to the default colors defined in the
Panel Designer.
SetMediaFile Replaces the media file of the Panel Designer
Media Player element.
SetPictureBoxImage Replaces the image of the Panel Designer
Picture Box element.

AUTOSAR PDU [▲ back]

Functions Short Description


PDU (object) Create a PDU object.
triggerPDU Triggers a PDU to be sent.

Byte Swapping (Intel/Motorola) [▲ back]

Functions Short Description


swapDWord Swaps bytes of parameters.
swapInt
swapInt64
swapLong
swapQWord
swapWord

File Functions [▲ back]

Functions Short Description


fileClose Closes the specified file.
fileGetBinaryBlock Reads characters from the specified file in
binary format.
fileGetString Reads a string from the specified file.
fileGetStringSZ Reads a string from the specified file.
filePutString Writes a string in the specified file.
fileRewind Resets the position pointer to the beginning of
the file.
fileWriteBinaryBlock Writes bytes in the specified file.
GetOfflineFileName Returns the complete path of the currently
used offline source file.
getAbsFilePath Gets the full path name for a path defined
relative to the current configuration.
getProfileArray Reads the value of the given variable from the

mk:@MSITStore:C:\Program%20Files\Vector%20CANalyzer%209.0\Help01\CAPLfuncti... 1/25/2018
General CAPL Functions Page 4 of 8

getProfileFloat specified section in the specified file.


getProfileInt
getProfileString
Open This function opens the file named filename.
openFileRead Opens the file for the read access.
openFileWrite Opens the file for the write access.
setFilePath Sets the read and write path to the directory.
setWritePath Sets the write path for the function
openFileWrite.
writeProfileFloat Opens the file, searches the section and writes
the variable.
writeProfileInt
writeProfileString

Flow Control [▲ back]

Functions Short Description


isOfflineMode Gets the information if CANalyzer is in offline
mode.
stop Programmed interrupt of the ongoing
measurement.

Language Support and Debugging [▲ back]

Functions Short Description


elCount Determines the number of elements of an
array.
fileName Output of the CAPL program in the Write
Window.
runError Triggers a run error.

Logging Functions [▲ back]

Functions Short Description


setLogFileName Sets the name of the logging file.
setPostTrigger Sets the posttrigger of the logging.
setPreTrigger Sets the pretrigger of the logging.
StartLogging Starts all Logging Blocks immediately
bypassing all logging trigger settings.
StopLogging Stops all Logging Blocks immediately bypassing
all logging trigger settings.
trigger Activates/Deactivates logging triggering of all
Logging and Trigger Blocks.
triggerEx Activates/Deactivates logging triggering of a

mk:@MSITStore:C:\Program%20Files\Vector%20CANalyzer%209.0\Help01\CAPLfuncti... 1/25/2018
General CAPL Functions Page 5 of 8

special Logging or Trigger Block.


writeToLog Writes an output string to an ASCII logging file.
writeToLogEx Writes an output string to an ASCII logging file.

Replay Functions [▲ back]

Functions Short Description


ReplayResume Starts the Replay Block after it is suspended.
ReplayStart Starts the Replay Block.
ReplayState Returns the state of the Replay Block.
ReplayStop Stops the Replay Block.
ReplaySuspend Suspends the Replay Block .
SetReplayFileName Replaces the source file of an existing Replay
Block

Standalone Mode [▲ back]

Functions Short Description


StandaloneConfigOpen Opens the RTCFG file with the given name as
standalone configuration.
StandaloneConfigSetDefault Changes the default configuration file.
StandaloneGetCurrentConfig Gets the name of the currently loaded
configuration in standalone mode.
StandaloneGetDefaultConfig Gets the name of the default configuration in
standalone mode.

String Functions [▲ back]

Note

Note string literals when using the following string functions.

Functions Short Description


_atoi64 Converts a string to a 64bit integer.
_gcvt Converts a number to a string.
atodbl Converts a string into a double number.
atol Converts a string to a LONG number.
ConvertString Converts a string from one encoding to another
encoding.
DecodeString Decodes the byte array input from the
encoding codepage.
EncodeString Encodes the string input with the encoding
codepage.
ltoa Converts a number to a string.

mk:@MSITStore:C:\Program%20Files\Vector%20CANalyzer%209.0\Help01\CAPLfuncti... 1/25/2018
General CAPL Functions Page 6 of 8

snprintf Prints a formatted string to character array.


strlen Gets the length of a string.
strncat Appends a string to another string.
strncmp Compares the number of characters of two
strings.
strncmp_off
strncpy Copies a string to another string.
strncpy_off
strstr Searches a string in another string.
strstr_off
strtod Converts a string to a floating point number.
strtol Converts a string to a 32bit integer.
strtoll Converts a string to a 64bit integer.
strtoul Converts a string to an unsigned 32bit integer.
strtoull Converts a string to an unsigned 64bit integer.
substr_cpy Copies a substring to another string.
substr_cpy_off
str_match_regex Checks whether a string completely matches a
regular expression pattern.
str_replace Replaces all occurrences of a text in a string
with another string.
Replaces a part of a string with another string.
str_replace_regex Replaces all occurrences of pattern in a string
with another string.
strstr_regex Searches for a regular expression pattern in a
string.
strstr_regex_off
toLower Transforms a character or string to lower case.
toUpper Transforms a character or string to upper case.

Time Management [▲ back]

Functions Short Description


cancelTimer Stops an active timer
convertTimestamp Converts a time stamp to separate parts.
convertTimestampNS
EnvVarTimeNS Returns the time stamp of the environment
variable envVariable in nanoseconds.
getLocalTime Returns details to the current date and time.
getLocalTimeString Copies a printed representation of the current
date and time.
isTimerActive Return value indicates whether a specific timer
is active.

mk:@MSITStore:C:\Program%20Files\Vector%20CANalyzer%209.0\Help01\CAPLfuncti... 1/25/2018
General CAPL Functions Page 7 of 8

MessageTimeNS Returns the time stamp in nanoseconds.


setTimer Sets a timer.
setTimerCyclic Sets a cyclical timer.
timeDiff Time difference between messages or between
a message and the current time in ms.
timeNow Supplies the current simulation time [10
microseconds].
timeNowFloat Supplies the current simulation time [10
microseconds].
timeNowInt64 Supplies the current simulation time
[nanoseconds].
timeNowNS Supplies the current simulation time
[nanoseconds].
timeToElapse Returns a value indicating how much more time
will elapse before an on timer event procedure
is called.

Trigonometric and Mathematical Functions [▲ back]

Functions Short Description


arccos Calculates arccosine of a value.
arcsin Calculates arcsine of a value.
arctan Calculates arctangent of a value.
_ceil Calculates the ceiling of a value.
_floor Calculates the floor of a value.
_Log Calculates the natural logarithm.
_Log10 Calculates the logarithm to base 10.
_max Returns the maximum of the parameters.
_min Returns the minimum of the parameters.
_pow Returns x to the power of y.
_round Rounds a number.
abs Returns the absolute value.
cos Calculates the cosine.
exp Calculates the exponential function.
random Calculates a random number.
sin Calculates the sine.
sqrt Calculates the square root.

User Interactions [▲ back]

Functions Short Description


CreateGlobalMarker Sets a marker.

mk:@MSITStore:C:\Program%20Files\Vector%20CANalyzer%209.0\Help01\CAPLfuncti... 1/25/2018
General CAPL Functions Page 8 of 8

keypressed Returns the key code of a currently pressed


key.
msgBeep Plays back a sound predefined by the Windows
system.
sysExec, sysExecCmd Executes an external command.
sysExit Exits the system (CANalyzer) from within a
CAPL program.
sysMinimize Minimizes or restores the application window of
CANalyzer.
write Outputs a text message to the Write Window .
writeClear Clears the contents of the specified page in the
Write Window.
writeConfigure Configures the specified page in the Write
Window.
writeCreate Generates a new page in the Write Window
with the specified name.
writeDestroy Removes the specified page from the Write
Window.
writeEx Writes the text into the last line of the specified
window or into a page of the Write Window
without previously creating a new line.
writeLineEX Writes the text into a new line of the specified
window or into a page of the Write Window.
writeTextBkgColor Sets the color for text background of the
specified page in the Write Window.
writeTextColor Sets the color for text of the specified page in
the Write Window.

| File Search Procedure | File Functions | Debugger |

Version 9.0 SP2


© Vector Informatik GmbH

mk:@MSITStore:C:\Program%20Files\Vector%20CANalyzer%209.0\Help01\CAPLfuncti... 1/25/2018

Potrebbero piacerti anche