Write consecutive byte values, specified by an address.
LJM_ERROR_RETURN LJM_eWriteAddressByteArray(
int Handle,
int Address,
int NumBytes,
const char * aBytes,
int * ErrorAddress)
LJM errorcodes or 0 for no error.
This function will append a 00 byte to aBytes for odd-numbered NumBytes.
If NumBytes is large enough, these functions will automatically split writes into multiple packets based on the current device's effective data packet size. Using both non-buffer and buffer registers in one function call is not supported.
The Name version of this function is LJM_eWriteNameByteArray.
[C/C++] Write a Lua script to LUA_SOURCE_WRITE
int LJMError; int ErrorAddress; const char * luaScript = "LJ.IntervalConfig(0, 1000)\n" "while true do\n" " if LJ.CheckInterval(0) then\n" " print(LJ.Tick())\n" " end\n" "end\n" "\0"; const unsigned scriptLength = strlen(luaScript) + 1; // handle comes from LJM_Open() LJMError = LJM_eWriteAddressByteArray( handle, LUA_SOURCE_WRITE_ADDRESS, scriptLength, luaScript, &ErrorAddress ); if (LJMError != LJME_NOERROR) { // Deal with error }