Page 1 of 1

Was rp_Init called

Posted: Mon Jul 04, 2022 10:34 am
by omereis
Hi All,
Is there a way to find out there was already a call to rp_Init()?

Thanks in advance,
Omer.

Re: Was rp_Init called

Posted: Mon Jul 04, 2022 3:32 pm
by M0JPI
I've not used the C API much, but there is a rp_IsApiInit() function that returns g_api_state.

I can't find an official example in the Red Pitaya documentation, but the source for the API is available on GitHub.

I did find KevinR117 has a GitHub repository that uses it in C++. He is using it with an if statement, so it must evaluate to false if the Red Pitaya API is not initialised.

John M0JPI