sn3_save_snapshots

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

sn3_save_snapshots

Previous pageReturn to chapter overviewNext page

 

函数

保存多个点的实时记录(批量接口)

int32 sn3_save_snapshots(

 int32 nRecNum,

 const uint32* pTagIDArray,

 const HD3Record* pRecArray,

 int32* pErrCodeArray

);

参数

nRecNum

   [in] 实时记录的个数,不能超过65535。

pTagIDArray

   [in] TagID的数组。

pRecArray

   [in] 需要被保存的记录数组。

pErrCodeArray

   [out] 错误码数组,表明每一条记录的是否保存成功。

返回值

保存成功,返回RD_SUCCESS,不是所有的都成功返回EC_HD_API_SAVE_SNAPSHOTS_FAILED。保存失败返回其它错误码,见error_code.h。

说明

记录结构体:

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;

}HD3Record;

 

记录长度:

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.