Hi,
The recorder functionality is not yet supported in FreeMASTER Lite. Are there any plans to fix this in the near future?
Luca
Hi Iulian,
That's good to hear. I was referring to the FreeMASTER 3.1.4 user guide document "FMSTERUG Rev 4.4 03/2022". In this document, all JSON-RPC methods related to the recorder functionality are marked with a cross for Lite. For example:
And the same of others. Hence I concluded that recorder is not supported in Lite. But from what you are saying maybe the document is a bit outdated?
I do not plan to use the JS client but rather interact with FreeMASTER Lite from Python. Anyway, you are saying that the recorder related JSON-RPC methods (documented in the user guide I mentioned above) are applicable to Lite as well. Therefore they should be usable with Python too.
Do I get this right?
Regards,
Luca
That document is correct, but there is indeed a bit of inconsistency. We tried to keep the API consistent as much as possible across both tools but in some cases, such as Recorder, it was not possible. FreeMASTER (GUI Application) and FreeMASTER Lite handle the Recorder feature differently and have different API's endpoints for it.
You can use both approaches from Python. Unfortunately, the code will not be portable from one tool to another.
Hope it helps,
Iulian
Hi Iulian,
I would like to know is there any document or information available for using 'Recorder' functionality via Freemaster Lite and JSON-RPC (like parameters, methods) as I am using Python script.
Regards,
Gohith
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
Hi Iulian,
Got it, i will look into PCM.html file + freemaster-client.js files and process forward. Thank you.
Regards,
Gohith
Hi Luca,
FreeMASTER Lite supports Recorder feature and exposes corresponding JSON-RPC API. FreeMASTER's JS Client implements functions that consume this API, you can refer to the Client documentation:
Beside SetupRecorder there is: GetRecorderLimits, StartRecorder, StopRecorder, GetRecorderStatus, GetRecorderData.
Let us know if you need more information or encounter issues while using it.
Kind regards,
Iulian