I'm actually using CoreOS on x86_64 processor, but my question can also relate to AWE Core.
I would like to be able to set the module status (to bypass, and back to active).
I see this API:
/**
* @brief Set the runtime status of a module.
* 0 = Active, 1 = Bypass, 2 = Mute, 3 = Inactive
* @param [in] pAWE instance pointer
* @param [in] handle packed object handle
* @param [in] status status to set
* @return error code
*/
INT32 awe_ctrlSetStatus(const AWEInstance *pAWE, UINT32 handle, UINT32 status);
My question: What is the handle?
When I generate the interface header files from the design, I get a handle for each module parameter, but not for the module itself. So, how do I get that handle?
Best regards,
Yair
10:08pm
Hello Yair,
You can change the run time module states from the Control Interface using the 'Status Set' module in conjunction with a 'DC Source Int' module, where the integer feeding the Status Set module corresponds to the desired module's run time status (0 = Active, 1 = Bypass, 2 = Mute, 3 = Inactive). You can truncate the DC Source Int module's range to 0-3, and then you must specify in the Status Set module's mod argument (right click -> View Properties) to point to the module you want to control.
Thanks,
Kevin
10:40pm
I'm trying to do it using the C api. All I need to know is how to get the module's handle
10:43pm
Hello Yair,
Yes, you would follow the instructions I provided and then assign the Object ID to the DC Source Int module.
Thanks,
Kevin
1:19pm
Hi Kevin,
Lets try this question from a different angle:
In the header file AWECoreOS.h you can find the following API:
/**
* @brief Set the status of a module. Valid status values are:
* @details 0=Active
*
* 1=Bypass
*
* 2=Mute
*
* 3=Inactive
*
* Module handles sizes can be generated for any layout using Tools->Generate Target Files in AWE Designer. Select the ControlInterface.h checkbox to generate control files.
* @param [in] pAWEOS AWE Core OS instance pointer
* @param [in] handle packed object handle
* @param [in] status status to set
* @return 0 on success, or error code
*/
INT32 aweOS_ctrlSetStatus(const AWEOSInstance *pAWEOS, UINT32 handle, UINT32 *status);
/**
* @brief Get the status of a module.
* Module handles sizes can be generated for any layout using Tools->Generate Target Files in AWE Designer. Select the ControlInterface.h checkbox to generate control files.
* @param [in] pAWEOS AWE Core OS instance pointer
* @param [in] handle packed object handle
* @param [out] status returned status
* @return 0 on success, or error code
*/
INT32 aweOS_ctrlGetStatus(const AWEOSInstance *pAWEOS, UINT32 handle, UINT32 *status);
These methods do exactly what I need to do. My question is: What should be the value of 'handle' ?
Assume I have a design with just one module (a ScalerV2, for example). I can generate the ControlInterface.h header file for it and I can see the interface definitions for it (assume I set its objectID to 30000). I do not see the module handle anywhere in this generated file (only the module parameters' handles).
Best regards,
Yair
6:52pm
Hello Yair,
Yes that is precisely what I described. You will use the DCSourceInt module's handle. I have attached a sample AWD and control interface header for your reference.
Thanks,
Kevin
11:29am
Thanks for the example. I understand it fully.
Now, if we look at the two methods (aweOS_ctrlSetStatus, aweOS_ctrlGetStatus): If I want to use them, what should be the value of the 'handle' parameter)?
1:06pm
Hello Yair, you can use the defined 'AWE_DC1_value_HANDLE' variable.
1:13pm
So, if I have a design that only uses a scaler (see the Simple design), and I want to use the API for it, which handle should I use in these methods?
3:04pm
Hi Yair, you can actually use any of the handles for the module you want to get/set runtime status.