From fb9aea27491cd16508a81aeabd0a5a2240a81d7f Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 3 Jul 2024 14:27:50 -0400 Subject: [PATCH] cwFlowTypes.h/cpp : Implemented var_set(abuf),var_set(fbuf),var_set(mbuf). --- cwFlowTypes.cpp | 35 +++++++++++++++++++++++++++++++++++ cwFlowTypes.h | 1 + 2 files changed, 36 insertions(+) diff --git a/cwFlowTypes.cpp b/cwFlowTypes.cpp index 9a4b4f1..2edba0b 100644 --- a/cwFlowTypes.cpp +++ b/cwFlowTypes.cpp @@ -198,6 +198,7 @@ namespace cw switch( v->tflag & kTypeMask ) { case kInvalidTFl: + cwLogPrint(""); break; case kBoolTFl: @@ -2621,6 +2622,40 @@ cw::rc_t cw::flow::var_set( proc_t* proc, unsigned vid, unsigned chIdx, const ch return rc; } +cw::rc_t cw::flow::var_set( proc_t* proc, unsigned vid, unsigned chIdx, abuf_t* val ) +{ + rc_t rc = kOkRC; + variable_t* var = nullptr; + + if((rc = var_find(proc, vid, chIdx, var )) == kOkRC ) + rc = _var_set_driver(var,kABufTFl,val); + + return rc; +} + +cw::rc_t cw::flow::var_set( proc_t* proc, unsigned vid, unsigned chIdx, fbuf_t* val ) +{ + rc_t rc = kOkRC; + variable_t* var = nullptr; + + if((rc = var_find(proc, vid, chIdx, var )) == kOkRC ) + rc = _var_set_driver(var,kFBufTFl,val); + + return rc; +} + +cw::rc_t cw::flow::var_set( proc_t* proc, unsigned vid, unsigned chIdx, mbuf_t* val ) +{ + rc_t rc = kOkRC; + variable_t* var = nullptr; + + if((rc = var_find(proc, vid, chIdx, var )) == kOkRC ) + rc = _var_set_driver(var,kMBufTFl,val); + + return rc; +} + + cw::rc_t cw::flow::var_set( proc_t* proc, unsigned vid, unsigned chIdx, const object_t* val ) { rc_t rc = kOkRC; diff --git a/cwFlowTypes.h b/cwFlowTypes.h index b09ba0d..472951e 100644 --- a/cwFlowTypes.h +++ b/cwFlowTypes.h @@ -704,6 +704,7 @@ namespace cw rc_t var_set( proc_t* proc, unsigned vid, unsigned chIdx, const char* val ); rc_t var_set( proc_t* proc, unsigned vid, unsigned chIdx, abuf_t* val ); rc_t var_set( proc_t* proc, unsigned vid, unsigned chIdx, fbuf_t* val ); + rc_t var_set( proc_t* proc, unsigned vid, unsigned chIdx, mbuf_t* val ); rc_t var_set( proc_t* proc, unsigned vid, unsigned chIdx, const object_t* val );