Supported operations
The following operations are available to every script, regardless of the language used, through the Profinity object.
- CAN bus communication: scripts can send CAN packets and read the latest received packets. Refer to CAN Bus for examples and usage.
- DBC message and signal information: scripts can read signal values from the loaded DBC files by component, message, and signal name, with the raw CAN data converted to physical values. Refer to DBC for examples and usage.
- State management: Profinity provides two state stores.
Statekeeps data for a single script between its runs, andGlobalStateshares data across multiple scripts. Refer to State for examples and usage. - Tags: scripts can read tag values, publish values to tags, and attach metadata to the tags they publish. Refer to Tags for examples and usage.
- Console output: scripts in all three languages can write information and error messages to the Profinity log. Refer to Console for examples and usage.
A script started by a firmware action also receives an action context: the action name, any uploaded file, the invoker, and progress reporting. Refer to Action context.
Component and firmware settings
A script on a Custom Component reads settings_map.yaml with Profinity.ComponentSettings and firmware_map.yaml with Profinity.FirmwareSettings.
firmware.yaml names the scripts that load and save those firmware values.
Refer to Component and firmware settings for the methods, which script reads or writes each value, and an example.
Where to go next
Each operation has its own page. The Profinity SDK page describes how to write and test a script offline, and Profinity offers a starting template for each script type when you create a script. The Profinity repository on GitHub also holds further C# and Python examples. The language references are on Supported Languages.