使用运行时访问与守护进程构建指南
运行时访问(RTA)相关内容
边缘检测函数
以下是一个用于检测边缘的函数 zedgedetect :
int zedgedetect(char *tbl, char *col, char *sql, void *pr,
int rowid, void *poldrow)
{
/* We detect an edge by seeing if the old value of
* zalarm is different from the new value. */
int oldalarm;
int newalarm;
/* normalize nonzero values to 1 */
if (((struct ZData *) pr)->zalarm != 0) {
((struct ZData *) pr)->zalarm = 1;
}
oldalarm = ((struct ZData *) poldrow)->zalarm;
newalarm = ((struct ZData *) pr)->zalarm;
if (oldalarm != newalarm) {
zdata[rowid].zcount++; /* increment counter */
printf("Transition from %d to %d
超级会员免费看
订阅专栏 解锁全文
1037

被折叠的 条评论
为什么被折叠?



