cwFlowTypes.h/cpp : Added external_device_t.
This commit is contained in:
parent
869d367ed9
commit
9e7ab2f367
@ -7,6 +7,7 @@
|
|||||||
#include "cwVectOps.h"
|
#include "cwVectOps.h"
|
||||||
#include "cwMtx.h"
|
#include "cwMtx.h"
|
||||||
#include "cwDspTypes.h" // real_t, sample_t
|
#include "cwDspTypes.h" // real_t, sample_t
|
||||||
|
#include "cwFlow.h"
|
||||||
#include "cwFlowTypes.h"
|
#include "cwFlowTypes.h"
|
||||||
|
|
||||||
|
|
||||||
@ -1049,6 +1050,16 @@ cw::rc_t cw::flow::instance_find( flow_t* p, const char* inst_label, instance_t*
|
|||||||
return cwLogError(kInvalidArgRC,"The instance '%s' was not found.", inst_label );
|
return cwLogError(kInvalidArgRC,"The instance '%s' was not found.", inst_label );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cw::flow::external_device_t* cw::flow::external_device_find( flow_t* p, const char* device_label, unsigned typeId, unsigned inOrOutFl )
|
||||||
|
{
|
||||||
|
for(unsigned i=0; i<p->deviceN; ++i)
|
||||||
|
if( cw::textIsEqual(p->deviceA[i].label,device_label) && p->deviceA[i].typeId==typeId && cwIsFlag(p->deviceA[i].flags,inOrOutFl ))
|
||||||
|
return p->deviceA + i;
|
||||||
|
|
||||||
|
cwLogError(kInvalidArgRC,"The %s device named '%s' could not be found.", cwIsFlag(inOrOutFl,kInFl) ? "in" : "out", device_label );
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
void cw::flow::instance_print( instance_t* inst )
|
void cw::flow::instance_print( instance_t* inst )
|
||||||
{
|
{
|
||||||
@ -1060,10 +1071,10 @@ void cw::flow::instance_print( instance_t* inst )
|
|||||||
|
|
||||||
if( inst->class_desc->members->report )
|
if( inst->class_desc->members->report )
|
||||||
inst->class_desc->members->report( inst );
|
inst->class_desc->members->report( inst );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cw::flow::_var_destroy( variable_t* var )
|
void cw::flow::_var_destroy( variable_t* var )
|
||||||
{
|
{
|
||||||
if( var != nullptr )
|
if( var != nullptr )
|
||||||
|
@ -195,6 +195,8 @@ namespace cw
|
|||||||
struct instance_str* link;
|
struct instance_str* link;
|
||||||
} instance_t;
|
} instance_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct flow_str
|
typedef struct flow_str
|
||||||
{
|
{
|
||||||
const object_t* cfg;
|
const object_t* cfg;
|
||||||
@ -206,6 +208,9 @@ namespace cw
|
|||||||
class_desc_t* classDescA; //
|
class_desc_t* classDescA; //
|
||||||
unsigned classDescN; //
|
unsigned classDescN; //
|
||||||
|
|
||||||
|
external_device_t* deviceA; // deviceA[ deviceN ] external device description array
|
||||||
|
unsigned deviceN; //
|
||||||
|
|
||||||
struct instance_str* network_head; // first instance
|
struct instance_str* network_head; // first instance
|
||||||
struct instance_str* network_tail; // last insance
|
struct instance_str* network_tail; // last insance
|
||||||
} flow_t;
|
} flow_t;
|
||||||
@ -256,6 +261,8 @@ namespace cw
|
|||||||
|
|
||||||
instance_t* instance_find( flow_t* p, const char* inst_label );
|
instance_t* instance_find( flow_t* p, const char* inst_label );
|
||||||
rc_t instance_find( flow_t* p, const char* inst_label, instance_t*& instPtrRef );
|
rc_t instance_find( flow_t* p, const char* inst_label, instance_t*& instPtrRef );
|
||||||
|
external_device_t* external_device_find( flow_t* p, const char* device_label, unsigned typeId, unsigned inOrOutFl );
|
||||||
|
|
||||||
void instance_print( instance_t* inst );
|
void instance_print( instance_t* inst );
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user