Starting, stopping scripts, moving files to/from device.
More...
|
kvStatus | kvScriptStart (const CanHandle hnd, int slotNo) |
|
kvStatus | kvScriptStop (const CanHandle hnd, int slotNo, int mode) |
|
kvStatus | kvScriptUnload (const CanHandle hnd, int slotNo) |
|
kvStatus | kvScriptSendEvent (const CanHandle hnd, int slotNo, int eventType, int eventNo, unsigned int data) |
|
kvEnvHandle | kvScriptEnvvarOpen (const CanHandle hnd, char *envvarName, int *envvarType, int *envvarSize) |
|
kvStatus | kvScriptEnvvarClose (kvEnvHandle eHnd) |
|
kvStatus | kvScriptEnvvarSetInt (kvEnvHandle eHnd, int val) |
|
kvStatus | kvScriptEnvvarGetInt (kvEnvHandle eHnd, int *val) |
|
kvStatus | kvScriptEnvvarSetFloat (kvEnvHandle eHnd, float val) |
|
kvStatus | kvScriptEnvvarGetFloat (kvEnvHandle eHnd, float *val) |
|
kvStatus | kvScriptEnvvarSetData (kvEnvHandle eHnd, void *buf, int start_index, int data_len) |
|
kvStatus | kvScriptEnvvarGetData (kvEnvHandle eHnd, void *buf, int start_index, int data_len) |
|
kvStatus | kvScriptLoadFileOnDevice (const CanHandle hnd, int slotNo, char *localFile) |
|
kvStatus | kvScriptLoadFile (const CanHandle hnd, int slotNo, char *filePathOnPC) |
|
kvStatus | kvScriptStatus (const CanHandle hnd, int slot, unsigned int *status) |
|
kvStatus | kvScriptGetMaxEnvvarSize (int hnd, int *envvarSize) |
|
kvStatus | kvFileCopyToDevice (const CanHandle hnd, char *hostFileName, char *deviceFileName) |
|
kvStatus | kvFileCopyFromDevice (const CanHandle hnd, char *deviceFileName, char *hostFileName) |
|
kvStatus | kvFileDelete (const CanHandle hnd, char *deviceFileName) |
|
kvStatus | kvFileGetName (const CanHandle hnd, int fileNo, char *name, int namelen) |
|
kvStatus | kvFileGetCount (const CanHandle hnd, int *count) |
|
kvStatus | kvFileGetSystemData (const CanHandle hnd, int itemCode, int *result) |
|
Starting, stopping scripts, moving files to/from device.
◆ kvFileCopyFromDevice()
kvStatus kvFileCopyFromDevice |
( |
const CanHandle |
hnd, |
|
|
char * |
deviceFileName, |
|
|
char * |
hostFileName |
|
) |
| |
The kvFileCopyFromDevice() function copies an arbitrary file from the device to the host.
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[in] | deviceFileName | The device file name; a pointer to a NULL terminated array of chars. |
[in] | hostFileName | The target host file name; a pointer to a NULL terminated array of chars. |
- Returns
- canOK (zero) if success
-
canERR_xxx (negative) if failure
- See also
- kvFileCopyToDevice()
◆ kvFileCopyToDevice()
kvStatus kvFileCopyToDevice |
( |
const CanHandle |
hnd, |
|
|
char * |
hostFileName, |
|
|
char * |
deviceFileName |
|
) |
| |
The kvFileCopyToDevice() function copies an arbitrary file from the host to the device.
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[in] | hostFileName | The host file name; a pointer to a NULL terminated array of chars. |
[in] | deviceFileName | The target device file name; a pointer to a NULL terminated array of chars. |
- Returns
- canOK (zero) if success
-
canERR_xxx (negative) if failure
- See also
- kvFileCopyFromDevice(), kvFileDelete()
◆ kvFileDelete()
The kvFileDelete() function deletes a file on the device.
- Note
- Deleting system files is not recommended.
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[in] | deviceFileName | The file on the device to delete; a pointer to a NULL terminated array of chars. |
- Returns
- canOK (zero) if success
-
canERR_xxx (negative) if failure
- See also
- kvFileCopyToDevice()
◆ kvFileGetCount()
◆ kvFileGetName()
The kvFileGetName() function returns the name of the file with number fileNo.
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[in] | fileNo | The number of the file. |
[out] | name | A buffer that will contain the name of the file. The name is a zero-terminated ASCII string. |
[in] | namelen | The length, in bytes, of the name buffer. |
- Returns
- canOK (zero) if success
-
canERR_xxx (negative) if failure
- See also
- kvFileGetCount(), kvFileGetSystemData()
◆ kvFileGetSystemData()
The kvFileGetSystemData() function is used for reading disk parameters, e.g. size, max number of (user) files, etc.
- Note
- Not yet implemented
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[in] | itemCode | The item we want information on. |
[out] | result | A pointer to a 32-bit integer that will receive the result. |
- Returns
- canOK (zero) if success
-
canERR_xxx (negative) if failure
◆ kvScriptEnvvarClose()
◆ kvScriptEnvvarGetData()
◆ kvScriptEnvvarGetFloat()
◆ kvScriptEnvvarGetInt()
◆ kvScriptEnvvarOpen()
kvEnvHandle kvScriptEnvvarOpen |
( |
const CanHandle |
hnd, |
|
|
char * |
envvarName, |
|
|
int * |
envvarType, |
|
|
int * |
envvarSize |
|
) |
| |
The kvScriptEnvvarOpen() opens an existing envvar and returns a handle to it.
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[in] | envvarName | The envvar's name; a pointer to a NULL terminated array of chars. |
[out] | envvarType | A pointer to a 32-bit integer that will receive the kvENVVAR_TYPE_xxx type. |
[out] | envvarSize | A pointer to a 32-bit integer that will receive the size of the envvar in bytes. |
- Note
- Not implemented in linux.
- Returns
- A kvEnvHandle handle (positive) to an envvar if success
-
canERR_xxx (negative) if failure
- See also
- kvScriptEnvvarXxx Example
-
kvScriptEnvvarClose()
◆ kvScriptEnvvarSetData()
◆ kvScriptEnvvarSetFloat()
◆ kvScriptEnvvarSetInt()
◆ kvScriptGetMaxEnvvarSize()
kvStatus kvScriptGetMaxEnvvarSize |
( |
int |
hnd, |
|
|
int * |
envvarSize |
|
) |
| |
The kvScriptGetMaxEnvvarSize() function returns the maximum size of an envvar.
- Note
- Not implemented in linux.
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[out] | envvarSize | The maximum size of an envvar. |
- Returns
- canOK (zero) if success
-
canERR_xxx (negative) if failure
◆ kvScriptLoadFile()
◆ kvScriptLoadFileOnDevice()
kvStatus kvScriptLoadFileOnDevice |
( |
const CanHandle |
hnd, |
|
|
int |
slotNo, |
|
|
char * |
localFile |
|
) |
| |
◆ kvScriptSendEvent()
kvStatus kvScriptSendEvent |
( |
const CanHandle |
hnd, |
|
|
int |
slotNo, |
|
|
int |
eventType, |
|
|
int |
eventNo, |
|
|
unsigned int |
data |
|
) |
| |
The kvScriptSendEvent() function sends an event of a type, and an event number and associated data to a script running in a specific slot.
- Note
- Not implemented in linux.
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[in] | slotNo | The slot where the script was loaded and is running. |
[in] | eventType | The event to send, of type kvEVENT_xxx |
[in] | eventNo | The event's number. |
[in] | data | The event's data. |
- Returns
- canOK (zero) if success
-
canERR_xxx (negative) if failure
- See also
- kvScriptSendEvent Example
◆ kvScriptStart()
◆ kvScriptStatus()
The kvScriptStatus() function reads the current status of a script slot.
- Note
- Not implemented in linux.
- Parameters
-
[in] | hnd | An open handle to a CAN channel. |
[in] | slot | The slot which status we want. |
[out] | status | The script status, as kvSCRIPT_STATUS_xxx flag bits |
- Returns
- canOK (zero) if success
-
canERR_xxx (negative) if failure
◆ kvScriptStop()
◆ kvScriptUnload()