sn3_query_snapshot

Navigation:  C++ > 内存快照接口 >

sn3_query_snapshot

Previous pageReturn to chapter overviewNext page

 

函数

快照数据:查询单点实时记录

int32 sn3_query_snapshot(

 uint32 nTagID,

 HD3Record* pRec

);

参数

nTagID

   [in] TagID。

pRec

   [in] 被保存的实时记录。

返回值

查询成功,返回RD_SUCCESS,查询失败返回其它错误码,见error_code.h。

说明

*  如果为string或blob类型的Tag,必须进行如下赋值

*   (a) 为HD3Record.value.strBlob.pBuf分配字节内存

*   (b) 赋值HD3Record.value.strBlob.nLenBuf = 1000

记录结构体:

HD3Record

copycode!MISSING PHRASE 'COPYCODE'!

typedef struct

{

int32 nSec;

int16 nMsec;

uint16 nQuality;

enum HD3_TAG_TYPE nTagType;

struct

{

 int8 nInt8;

 int16 nInt16;

 int32 nInt32;

 float32 fFloat32;

 float64 fFloat64;

 int8 nDigital;

 struct

 {

  char* pBuf;

  uint16 nLenBuf;

 }strBlob;

}value;

}HDRecord;

 

记录长度:

TagType为String和Blob时,value.strBlob.pBuf由使用者来分配空间,分配的空间的大小为value.strBlob.nValueLen不能小于string或者Blob类型允许的最大长度LENGTH_VAR_TYPE_VALUE。

举例

示例代码参见内存快照接口

参见:

sn3_query_snapshot

sn3_query_snapshots

sn3_save_disorder_snapshots

sn3_save_tags_disorder_snapshots

sn3_save_snapshot

sn3_save_snapshots

sn3_register_callback

sn3_unregister_callback

sn3_register_value_change_callback

sn3_unregister_value_change_callback

 

©2015. All Rights Reserved.

 

 

©2015. All Rights Reserved.