|
| int | rdb_create () |
| | 创建接口
|
| |
| int | rdb_setslavedb (int h, const char *sip, unsigned short wport, const char *sUser, const char *sPass) |
| | 设置从库
|
| |
| int | rdb_setmessagenotify (int h, rdbcd_onmessage fun, void *param) |
| | 设置消息通知回调函数
|
| |
| int | rdb_destory (int h) |
| | 删除句柄
|
| |
| int | rdb_connectex (int h, const char *surl, const char *sUser, const char *sPass, int nTimeOutSec) |
| | 高级模式连接实时库
|
| |
| int | rdb_connect (int h, const char *sServerIP, unsigned short wPort, const char *lpszUser, const char *lpszPass) |
| | 连接实时库
|
| |
| int | rdb_connectasyn (int h, const char *sServerIP, unsigned short wPort, const char *lpszUser, const char *lpszPass) |
| | 异步连接实时库
|
| |
| int | rdb_disconnect (int h) |
| | 断开实时库
|
| |
| bool | rdb_isconnected (int h) |
| | 判断连接状态
|
| |
| int | rdb_curdb (int h) |
| | 获取当前连接的实时库
|
| |
| int | rdb_curdb_inver (int h) |
| | 获取当前实时库的内部版本
|
| |
| int | rdb_actoradd (int h, rec_actor *pa) |
| | 添加用户角色
|
| |
| int | rdb_actordel (int h, const char *sname) |
| | 删除用户角色
|
| |
| int | rdb_actorsget (int h, rec_actor actors[], int nrecbufsize, int *pnacts) |
| | 读取角色表
|
| |
| int | rdb_operatoradd (int h, rec_operator *po) |
| | 添加用户账号
|
| |
| int | rdb_operatordel (int h, const char *sname) |
| | 删除用户账号
|
| |
| int | rdb_operatorsget (int h, rec_operator opts[], int nrecbufsize, int *pnopts) |
| | 读取账号表
|
| |
| int | rdb_operatormodifypass (int h, const char *sname, const char *soldpass, const char *snewpass) |
| | 更改自己密码
|
| |
| int | rdb_taginport (int h, unsigned int dwflag, rec_tag *ptag, int *presult) |
| | 导入(添加,更改)标签
|
| |
| int | rdb_tagget (int h, rec_tag *ptag) |
| | 读取标签属性记录
|
| |
| int | rdb_tagdel (int h, const char *sname) |
| | 删除标签
|
| |
| int | rdb_tagquery (int h, const char *snamefilter, const char *sdesfilter, int ndatatype, int ntagclass, rdbcb_OnReadTags pfun, void *pParam) |
| | 查询标签
|
| |
| int | rdb_valputsnapshot (int h, rec_tagval vals[], int nsize) |
| | 写值标签快照(写值标签实时数据)
|
| |
| int | rdb_valgetsnapshot (int h, rec_tagval vals[], int nsize) |
| | 读取值标签快照(读值标签实时数据)
|
| |
| int | rdb_valinsert (int h, rec_tagval vals[], int nsize) |
| | 补录值标签数据(写值标签历史数据)
|
| |
| int | rdb_valgetsection (int h, long long ltime, int nflag, rec_tagval vals[], int nsize) |
| | 读取值标签历史断面数据
|
| |
| int | rdb_valquery (int h, const char *sname, const char *sexp, long long lts, long long lte, long long lds, int lflag, rdbcb_OnReadVals pfun, void *pParam) |
| | 查询值标签历史数据记录
|
| |
| int | rdb_objputsnapshot (int h, rec_tagobj pobjs[], int nsize) |
| | 写对象标签快照(写对象标签实时数据)
|
| |
| int | rdb_objgetsnapshot (int h, rec_tagobj pobjs[], int nsize) |
| | 读取对象标签快照数据(读对象标签实时数据)
|
| |
| int | rdb_objinsert (int h, rec_tagobj pobjs[], int nsize) |
| | 补录对象标签历史数据(写对象标签历史数据)
|
| |
| int | rdb_objget (int h, const char *stagname, long long lts, long long lte, rdbcb_OnReadObjs pfun, void *pParam) |
| | 读取对象标签历史数据
|
| |
| int | rdb_soeput (int h, rec_soe psoe[], int nsize) |
| | 写入SOE事件
|
| |
| int | rdb_soequery (int h, long long lts, unsigned int autokey, long long lte, const char *sexp, rdbcb_OnReadSoes pfun, void *pParam) |
| | 查询SOE事件
|
| |
| int | rdb_soeupdate (int h, rec_soe psoe[], int nsize) |
| | 更新SOE事件记录
|
| |
| int | rdb_soesubscription (int h, int flag) |
| | 订阅SOE事件
|
| |
| int | rdb_soesubscription_setfun (int h, rdbcb_OnSscPutSoes fun, void *param) |
| | 设置处理订阅的SOE事件处理回调函数
|
| |
| int | rdb_countvalue (int h, const char *sname, const char *sexp, long long lts, long long lte, rec_val *pMin, rec_val *pMax, double *pavg, double *psum, int *plrecs) |
| | 值标签数据记录统计
|
| |
| int | rbd_countstatuschang (int h, const char *sname, long long lts, long long lte, int nlowval, int nhighval, int *pnl2h, int *pnh2l) |
| | 值标签状态改变统计
|
| |
| int | rdb_countvaltime (int h, const char *sname, const char *sexp, long long lts, long long lte, long long *pltime, int *plrecs) |
| | 值标签数据c持续时间统计
|
| |
| long long | rdb_time () |
| | 获取当前时间的实时库时标
|
| |
| long long | rdb_localtime2rdbtime (int nyear, int nmon, int nday, int nhour, int nmin, int nsec, int nmsec) |
| | 本地时间合成为实时库时标T_TIME
|
| |
| bool | rdb_rdbtime2localtime (T_TIME ltime, int *pnyear, int *pnmon, int *pnday, int *pnhour, int *pnmin, int *pnsec, int *pnmsec) |
| | 实时库时标T_TIME分解为本地时间
|
| |
| int | rdb_initwritetodevice (int h, ctrl_OnValWriteToDevice funvalw, void *paramvalw, ctrl_OnObjWriteToDevice funobjw, void *paramobjw) |
| | 初始化写设备回调函数
|
| |
| int | rdb_regctrltag (int h, const char *stagname) |
| | 注册控制标签
|
| |
| int | rdb_writevaltodevice (int h, rec_tagval *pval) |
| | 写值标签的值到现场设备
|
| |
| int | rdb_writeobjtodevice (int h, rec_tagobj *pobj) |
| | 写对象标签的值到现场设备
|
| |
| int | rdbtime_tostr (int64_t ltime, char *sout, size_t outsize) |
| | 实时库时间(从1970-1-1开始的100毫秒数)转换为字符串
|
| |
| int64_t | rdbtime_fromstr (const char *str, size_t zlen) |
| | 本地字符串表达的时间转换为实时库时间
|
| |
| void | rdb_md5_encode (const void *pdata, int nsize, unsigned char out[16]) |
| | 计算md5散列值
|
| |
| int | rdb_base64_encode (const void *pdata, int nsize, char *sout, int noutsize) |
| | base64快速编码
|
| |
| int | rdb_base64_decode (const char *pdata, int nsize, unsigned char *sout, int noutsize) |
| | base64快速解码
|
| |
| const char * | rdb_geterrmsg (int nerrcode) |
| | 根据错误码获取错误描述
|
| |
| int | rdb_manual_set (int h, rec_tagval *pval) |
| | 设置人工置数
|
| |
| int | rdb_manual_del (int h, const char *stagname) |
| | 取消人工置数
|
| |
| int | rdb_getoutlimit_snaps (int h, const char *station, void(*onread)(rec_tagval pvals[], int nitems, void *param), void *puserparam) |
| | 读取当前越限标签快照
|
| |
| int | rdb_getsnapshot (int h, const char *tagnames[], int nsize, void(*funval)(const rec_tagval vals[], size_t valsize, void *param), void *param_val, void(*funobj)(const rec_tagobj objs[], size_t objsize, void *param), void *param_obj) |
| | 读取快照,不分值标签还是对象标签
|
| |
| int | rdb_callmsg (int h, const char *request, int requestsize, void(*fun)(const char *response, int sizeresponse, void *app_param), void *app_param) |
| | 向实时库请求消息;
|
| |
| int | rdb_putmsg (int h, const char *jstr, int jstrsize) |
| | 向实时库推送消息
|
| |
| int | rdb_soesubscription_ex (int h, int flag, const char *station) |
| | 订阅SOE的高级版,支持通过中心站订阅子站SOE
|
| |
| int | rdb_soequery_ex (int h, const char *station, long long lts, unsigned int autokey, long long lte, const char *sexp, rdbcb_OnReadSoes pfun, void *puserparam) |
| | 查询SOE事件高级版,支持通过中心站从子站查询
|
| |
| int | rdb_liststation (int h, void(*fun)(const char *jsresp, int sizeresp, void *app_param), void *app_param) |
| | 从中心站查询当前在线子站列表和概要信息
|
| |
| int | rdb_getruninfo (int h, const char *stationid, void(*fun)(const char *jsresp, int sizeresp, void *app_param), void *app_param) |
| | 从中心站查询子站运行信息
|
| |
| int | rdb_tagext_inport (int h, tag_ext *pext, uint32_t umask) |
| | 导入标签扩展属性
|
| |
| int | rdb_tagext_get (int h, tag_ext *ptags, int size) |
| | 获取一批标签扩展属性
|
| |
| int | rdb_tagext_del (int h, const char *tagname) |
| | 删除一个标签的扩展属性
|
| |
| int | rdb_datadelete (int h, const char *tagname, const char *datetime_begin, const char *datetime_end, int *pnumdelrecords) |
| | 删除标签数据记录, 双机热备时,只删除当前连接的实时库中数据。
|
| |
| int | rdb_soedelete (int h, const char *datetime_begin, unsigned int ukey_begin, const char *datetime_end, unsigned int ukey_end, int *pnumdelrecords) |
| | 删除SOE记录, 双机热备时,只删除当前连接的实时库中数据。
|
| |
| int | rdb_valinsertex (int h, const char *tagname, rec_val vals[], int numvals, int *pninsert, int *pnupdate, int *pnignore) |
| | 值类型标签数据记录增强插入,无压缩插入一个标签的多条记录,用于备份或者数据维护,如果存在,不相同更改。 双机热备时,只在当前连接的实时库中插入数据。
|
| |
| int | rdb_objinsertex (int h, const char *tagname, rec_obj objs[], int numobjs, int *pninsert, int *pnupdate, int *pnignore) |
| | 对像类型标签数据记录增强插入一个标签的多条记录,用于备份或者数据维护,如果存在,不相同更改。双机热备时,只在当前连接的实时库中插入数据。
|
| |
| int | rdb_getworkmode (int h, int *pworkmode) |
| | 读取工作模式
|
| |
| int | rdb_setworkmode (int h, int workmode, int *pworkmode) |
| | 设置工作模式
|
| |
| int | rdb_pushjsonmessage_setfun (int h, rdbcb_OnPushJsonMsgs fun, void *pfunparam) |
| | 设置处理实时库推送json消息的处理回调函数,用于高级用户自己解析订阅推送的快照和SOE
|
| |
| int | rdb_subscription_setfun (int h, rdbcb_OnPushValSnaps funVal, void *pValparam, rdbcb_OnPushObjSnaps funObj, void *pObjparam) |
| | 设置订阅标签快照处理回调函数
|
| |
| int | rdb_sscsnaps (int h, int mode, int codepage, const char *tagnames[], int nsize, void(*funErr)(const char *tagname, int errcode, void *param), void *paramFun) |
| | 订阅快照,订阅后,当有新的快照数据写入实时库时,对每个订阅者推送一份快照数据。
|
| |
| int | rdb_unsscsnaps (int h, int codepage, const char *tagnames[], int nsize, void(*funErr)(const char *tagname, int errcode, void *param), void *paramFun) |
| | 取消订阅快照
|
| |
| int | rdb_unsscallsnaps (int h) |
| | 取消所有订阅
|
| |
| int | rdb_listsscsnaps (int h, int codepage, void(*funTag)(const char *tagname, void *param), void *paramFun) |
| | 读取当前自己的订阅表
|
| |
| int | rdb_apiver () |
| | rdbapi的文件版本
|
| |
| int | rdb_gbk2utf8 (const char *sgbk, size_t gbksize, char *sout, size_t outsize) |
| | GBK转UTF8
|
| |
| int | rdb_utf82gbk (const char *sutf8, size_t utf8size, char *sout, size_t outsize) |
| | UTF8转GBK
|
| |
| int | rdb_jtime2string (long long jtime, char *out, size_t outsize, int useLocalTimeZone) |
| | js时标转ISO8601格式字字符串时标,例"2023-2-20T12:10:32.123+08:00"
|
| |
| long long | rdb_string2jtime (const char *sdatetime, size_t zlen) |
| | ISO8601字符串格式的时标转换为jtime(int64, 自1970-1-1开始的毫秒数,UTC时标(0时区))
|
| |