Hi Gohith,
You can refer to JS client documentation available in "C:\NXP\FreeMASTER 3.1\FreeMASTER Lite\html\client\PCM.html". JS client is a simple wrapper over JSON-RPC and uses the same function names, and parameters.
Let's take SetupRecorder function I mentioned before as example. In the documentation it looks like this:
let id = 0;
let config = {
pointsTotal: 100,
pointsPreTrigger: 50,
timeDiv: 1
};
let vars = [{ name: 'myVar1'}, { name: 'myVar2', trgType: 0x14, trgThr: 2000 }, { name: 'myVar3'}];
pcm.SetupRecorder(id, config, vars).then(() => console.log("Recorder was setup successfully."));
And JSON-RPC request would look like this:
{
"jsonrpc": "2.0",
"method": "SetupRecorder",
"params":
{
"id": 0,
"config": { "pointsTotal": 100, "pointsPreTrigger": 50, "timeDiv": 1},
"vars": [{ "name": "myVar1"}, { "name": "myVar2", "trgType": 0x14, "trgThr": 2000 }, { "name": "myVar3"}]
},
"id": "request_id"
}
Regards,
Iulian