41 #define _CRT_SECURE_NO_DEPRECATE //do not use windows secure crt 49 #define __FILE_ID__ "voc" 53 ,_valueCallbackVoc(NULL)
54 ,_timedReportCallbackVoc(NULL)
106 obj =
new YVoc(func);
109 }
catch (std::exception) {
131 if (callback != NULL) {
138 if (callback != NULL && this->
isOnline()) {
172 if (callback != NULL) {
203 vector<YFUN_DESCR> v_fundescr;
205 string serial, funcId, funcName, funcVal, errmsg;
208 v_fundescr.size() == 0 ||
static void _UpdateTimedReportCallbackList(YFunction *func, bool add)
YVocTimedReportCallback _timedReportCallbackVoc
static YVoc * FirstVoc(void)
void(* YVocValueCallback)(YVoc *func, const string &functionValue)
virtual int _invokeValueCallback(string value)
void(* YVocTimedReportCallback)(YVoc *func, YMeasure measure)
void yLeaveCriticalSection(yCRITICAL_SECTION *cs)
static YRETCODE getFunctionInfo(YFUN_DESCR fundesc, YDEV_DESCR &devdescr, string &serial, string &funcId, string &funcName, string &funcVal, string &errmsg)
static void _AddToCache(const string &classname, const string &func, YFunction *obj)
virtual int _invokeTimedReportCallback(YMeasure value)
virtual int _invokeValueCallback(string value)
static YFunction * _FindFromCache(const string &classname, const string &func)
void yEnterCriticalSection(yCRITICAL_SECTION *cs)
static yCRITICAL_SECTION _global_cs
virtual int registerValueCallback(YVocValueCallback callback)
static int getFunctionsByClass(const string &class_str, YFUN_DESCR prevfundesc, vector< YFUN_DESCR > &buffer, int maxsize, string &errmsg)
virtual int registerTimedReportCallback(YVocTimedReportCallback callback)
YVocValueCallback _valueCallbackVoc
virtual int _invokeTimedReportCallback(YMeasure value)
static bool _apiInitialized
YRETCODE _nextFunction(string &hwId)
static void _UpdateValueCallbackList(YFunction *func, bool add)
static YVoc * FindVoc(string func)