Adding parameter setter and getter for reproduction modules

parent 524f1b31
......@@ -2741,7 +2741,6 @@ DECLARE_FUNCTION_REQUIRED_INARG( set_rendering_module_muted, sModuleID, "string"
DECLARE_FUNCTION_REQUIRED_INARG( set_rendering_module_muted, bMuted, "logical-1x1", "Mute (true) or unmute (false)" );
void set_rendering_module_muted( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 3 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
......@@ -3011,6 +3010,37 @@ void get_reproduction_modules( int, mxArray *plhs[], int nrhs, const mxArray *pr
}
}
REGISTER_PUBLIC_FUNCTION( get_reproduction_module_parameters, "Returns the current reproduction module parameters", "" );
DECLARE_FUNCTION_REQUIRED_INARG( get_reproduction_module_parameters, sModuleID, "string", "Module identifier" );
DECLARE_FUNCTION_REQUIRED_INARG( get_reproduction_module_parameters, args, "mstruct", "Requested parameters" );
DECLARE_FUNCTION_OUTARG( get_reproduction_module_parameters, params, "mstruct", "Parameters" );
void get_reproduction_module_parameters( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 3 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
std::string sID = matlabGetString( prhs[ 1 ], "sModuleID" );
CVAStruct oArgs = matlabGetStruct( prhs[ 2 ], "args" );
CVAStruct oRet = pConnection->pCoreInterface->GetReproductionModuleParameters( sID, oArgs );
plhs[ 0 ] = matlabCreateStruct( oRet );
}
REGISTER_PUBLIC_FUNCTION( set_reproduction_module_parameters, "Sets reproduction module parameters", "" );
DECLARE_FUNCTION_REQUIRED_INARG( set_reproduction_module_parameters, sModuleID, "string", "Module identifier" );
DECLARE_FUNCTION_REQUIRED_INARG( set_reproduction_module_parameters, params, "mstruct", "Parameters" );
void set_reproduction_module_parameters( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 3 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
std::string sID = matlabGetString( prhs[ 1 ], "sModuleID" );
CVAStruct oParams = matlabGetStruct( prhs[ 2 ], "params" );
pConnection->pCoreInterface->SetReproductionModuleParameters( sID, oParams );
}
/* +----------------------------------------------------------+ *
* | | *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment