Adding signal source prototype from parameters creation call

parent 80a549f0
......@@ -1176,6 +1176,25 @@ void create_signal_source_network_stream( int nlhs, mxArray *plhs[], int nrhs, c
plhs[ 0 ] = mxCreateString( sID.c_str() );
}
REGISTER_PUBLIC_FUNCTION( create_signal_source_prototype_from_parameters, "Creates a prototype signal source, provide 'class' parameter!", "" );
DECLARE_FUNCTION_REQUIRED_INARG( create_signal_source_prototype_from_parameters, params, "struct", "Parameters" );
DECLARE_FUNCTION_OPTIONAL_INARG( create_signal_source_prototype_from_parameters, name, "string", "Displayed name", "''" );
DECLARE_FUNCTION_OUTARG( create_signal_source_prototype_from_parameters, signalSourceID, "string", "Signal source ID" );
void create_signal_source_prototype_from_parameters( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 3 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
CVAStruct oParams = matlabGetStruct( prhs[ 1 ], "params" );
std::string sName = matlabGetString( prhs[ 2 ], "name" );
std::string sID = pConnection->pCoreInterface->CreateSignalSourcePrototypeFromParameters( oParams, sName );
plhs[ 0 ] = mxCreateString( sID.c_str() );
}
// ------------------------------------------------------------
REGISTER_PUBLIC_FUNCTION( delete_signal_source, "Deletes a signal source", "A signal source can only be deleted, if it is not in use." );
......
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