Commands that provide access to logger instrument data and functions.
List a directory on the device.
Command
Response
Command
{
"file": [{
"command": "listdir",
"type": "sd0",
"path": "/"
}]
}
Response
{
"file": [{
"command": "listdir",
"statusCode": 0,
"files": ["fileone.txt", "filetwo.bin"],
"type": "sd0",
"path": "/",
"wait": 0
}]
}
Write a file.
Command
Response
Command
80\r\n
{
"file": [{
"command":"write",
"type":"flash",
"path":"hardprofiledata.json",
"filePosition":0,
"binaryOffset":0,
"binaryLength":434
}]
}\r\n
1b2\r\n
<Binary Data>
0\r\n
\r\n
Response
{
"file": [{
"command":"write",
"statusCode":0,
"type":"flash",
"path":"hardprofiledata.json",
"actualFilePosition":0,
"binaryOffset":0,
"binaryLength":434,
"wait":0
}]
}
Read a file.
Command
Response
Command
{
"file": [{
"command":"read",
"type":"flash",
"path":"hardprofiledata.json",
"filePosition":0,
"requestedLength":-1
}]
}
Response
80\r\n
{
"file": [{
"command":"read",
"statusCode":0,
"type":"flash",
"path":"hardprofiledata.json",
"actualFilePosition":0,
"actualLength":-1,
"binaryOffset":0,
"binaryLength":454,
"wait":0
}]
}\r\n
1B2\r\n
<Binary Data>
0\r\n
\r\n
Delete a file on the device.
Command
Response
Command
{
"file":[{
"command":"getFileSize",
"type":"sd0",
"path":"ch1.dlog"
}]
}
Response
{
"file":[{
"command":"getFileSize",
"statusCode":0,
"type":"sd0",
"path":"ch1.dlog",
"actualFileSize":4070,
"wait":0
}]
}
Delete a file on the device.
Command
Response
Command
{
"file": [{
"command": "delete",
"type": "sd0",
"path": "garbage.txt"
}]
}
Response
{
"file": [{
"command": "delete",
"statusCode": 0,
"type": "sd0",
"path": "garbage.txt",
"wait": 0
}]
}