AppEngine API Documentation
Introducing to AppEngine
About AppEngine
VCTool AppEngine is a cutting-edge tool designed specifically for crafting script-based applications within VCTool. Its primary mission is to simplify the execution of routine tasks related to maintenance, retrofit and vehicle configuration modifications. Built upon the robustness of the C# language syntax, it offers an extensive API to empower developers in creating versatile applications tailored to their specific needs.
One of the standout features of AppEngine is its hosting capability. Applications can be securely hosted on our server, providing a seamless experience to users. Moreover, there's an added layer of flexibility for publication: applications can either be made publicly accessible to the entire user base or shared exclusively with select users, ensuring the right balance between accessibility and privacy.
Dive into this documentation to explore the full potential of AppEngine and elevate your scripting experience in VCTool.
Possibilities
VCTool AppEngine offers an expansive range of functionalities to supercharge your scripting experience in VCTool. Here’s a quick overview of the key categories you can delve into:
Vehicle Information
Understand the essentials about the vehicle. Gather information such as its connectivity status, name, model year, and even the Vehicle Identification Number (VIN).
bool IsConnected()
string GetCarName()
int GetModelYear()
string GetVin()
bool? CheckIgnition()
bool HasBackup()
Console Log and User Interaction
Interact directly with the user through the console and message boxes. Whether it's printing messages, seeking user input, or showing notifications or lists, this section encompasses it all.
bool IsCancellationRequested()
void Clear()
void Print(params obeject[] objects)
void PrintLine(params obeject[] objects)
void SetTextColor(string argb)
int SelectFromList(string message, params string[] items)
string InputBox(string message, string defaultText = "")
void ShowMsg(string message, bool isError = false)
string GetUserName()
Progress panel methods
void ShowWorkingPlate(bool show)
void InitProgressBar(long maximum)
void SetProgressBarValue(long value)
void IncreaseProgressBarValue(long step = 1)
void SetWorkingPlateText(string text)
ECU Communication
Your gateway to communicating with the ECU's. Whether it's sending or receiving data, changing sessions, uploading dataset, flashing etc., this section has got you covered.
string GetUdsError()
byte GetUdsErrorCode()
bool OpenEcu(int address)
void CloseEcu()
bool EcuReset(int mode = 2)
bool ChangeSession(byte session)
byte[] ReadDataById(int id)
bool WriteDataById(int id, byte[] data, bool writeFingerPrint = true)
byte[] SendRawHex(byte[] data, bool supressResponse = false)
Security Access
bool Login(int login)
bool Login(string hexAlg, byte mode)
byte[] GetSeed(int mode)
bool SendKey(int mode, byte[] data)
Routine Control
byte[] StartRoutine(int routine, byte[] data = null)
byte[] StopRoutine(int routine, byte[] data = null)
byte[] ResultRoutine(int routine, byte[] data = null)
Memory Cells Service
byte[] ReadMemoryByAddress(uint address, uint size, byte alfid)
bool WriteMemoryByAddress(uint address, uint size, byte alfid, byte[] data)
Upload/download service
byte[] RequestUpload(uint address, uint size, byte alfid, byte dfi)
Uploading Datasets
bool UploadXmlDatasetFromContainer(string dataName, uint login = 0, string name = null, string version = null)
bool UploadXmlDatasetFromContainer(string dataName, uint login = 0, string name = null, string version = null, params int[] indexes)
bool UploadXmlDatasetFromFile(string fileName, uint login = 0, string name = null, string version = null)
bool UploadXmlDatasetFromFile(string fileName, uint login = 0, string name = null, string version = null, params int[] indexes)
bool UploadDatasetGen1(uint login, uint address, byte alfid, bool erase, byte[] data, bool restart = true, string name = "", string version = "")
bool UploadDatasetGen2(uint login, ushort address, byte[] data, bool restart = true, string name = "", string version = "")
void ListDatasetFromContainer(string dataName)
void ListDatasetFromFile(string fileName)
Flashing
string GetFlashingResult()
byte GetFlashingResultCode()
bool PerformFlashFromContainer(string name, bool checkBlockVersions = true, bool silent = false)
bool PerformFlashFromFile(string filename, bool checkBlockVersions = true, bool silent = false)
void ListFlashDataBlocksFromContainer(string name)
void ListFlashDataBlocksFromFile(string filename)
SWaP/FoD
bool EcuHasSwap()
bool CheckSwap(string fsid, out byte status)
(string code, string description, byte status)[] GetCompleteSwapList()
bool SendFscDataset(byte[] dataset)
ECU Identification
Fetch in-depth details about the ECU. From software and hardware versions to various ECU descriptors, dive into this section to understand your ECU better.
(string ident, string value)[] ReadCompleteIdentification()
string GetEcuSw()
string GetEcuSwVersion()
string GetEcuHw()
string GetEcuHwVersion()
string GetEcuDescription()
string GetEcuOdxName()
string GetEcuOdxVersion()
string GetEcuZdcName()
string GetEcuZdcVersion()
string GetEcuSerial()
string GetEcuVcrn()
SFD
SFD (Schutz Fahrzeug Diagnose) capabilities to enhance security. From getting challenges to sending tokens and invoking dialogs, manage SFD operations efficiently.
bool HasSfd()
bool IsSfdUnlocked()
byte[] GetSfdChallenge()
bool SendToken(byte[] token)
void LockSfd()
void InvokeSfdDialog(ushort diagAddr, bool onlyIfLocked = true)
DTC's
Diagnostic Trouble Code operations at your fingertips. Clear vehicle faults and handle other fault-related tasks smoothly.
void ClearVehicleFaults()
bool ClearFaults()
int GetDtcCount(byte mask = 0xAE)
byte[] GetDtc(byte mask = 0xAE)
(int code, byte status)[] GetDtcList(byte[] data)
(string sae, string odx, string text) GetDtcDescription(int address, int code)
Arrays
Array manipulation made simple. Convert, merge, reverse or even fetch specific data from arrays with ease.
string ArrayToHexString(byte[] data)
byte[] HexStringToArray(string hex)
string ByteArrayToString(byte[] bytes)
byte[] StringToByteArray(string text)
byte[] SubArray(byte[] array, int offset, int count = 0, bool reverse = false)
byte[] MergeArrays(params byte[][] arrs)
void ReverseArray(byte[] arr)
byte[] GenerateFilledArray(byte fill, int length)
short GetInt16FromArray(byte[] dataBytes, int offset, bool reverse = false)
ushort GetUInt16FromArray(byte[] dataBytes, int offset, bool reverse = false)
int GetInt32FromArray(byte[] dataBytes, int offset, bool reverse = false)
uint GetUInt32FromArray(byte[] dataBytes, int offset, bool reverse = false)
bool ApplyMaskedValues(byte[] dataBytes, byte[] valueBytes, byte[] maskBytes, int offset = 0)
bool ArrayCopy(byte[] source, int sourceOffset, byte[] destination, int destinationOffset, int count)
Bit Operations
Handle bit-level operations seamlessly. Modify, test, or apply masks to bits without a hassle.
byte ModifyBit(byte value, byte bit, bool set)
byte ModifyBit(byte value, byte valueToSet, byte mask)
byte ApplyMask(byte value, byte mask)
bool TestBit(byte value, byte bit)
Checksums
Ensure data integrity with Checksum utilities. Calculate CRC32, CRC16, and other checksums reliably.
Operations with Data Stored in a Container
Fetch or manipulate data stored in containers effortlessly.
Other
A collection of miscellaneous utilities. From time stamp fetching, sleeping operations to saving data on files, explore an array of useful tools.
void Sleep(int milliseconds)
string GetCurrentSortableTimeStamp()
double GetCurrentUnixTimeStamp()
void SaveBytesToFile(string filename, byte[] data)
void SaveTextToFile(string filename, string data)
int GetInterfaceType()
Each of these categories is packed with methods and tools tailored to enhance your scripting experience in VCTool. As you navigate through this documentation, you'll uncover the depth of possibilities AppEngine offers.