Ets_State_Block_Int_Read()

注意: 需要 OPNET Development Kit

摘要

从跨平台块存储中读取整数值。

语法

Ets_State_Block_Int_Read (block_hndl, int_ptr)
参数 类型 说明
block_hndl EtsT_State_Block_Handle 跨平台数据块的句柄
int_ptr int * 指向用于存储所读取值的变量的指针

返回类型

EtsT_Compcode

若读取操作成功则返回 EtsC_Compcode_Success,否则返回 EtsC_Compcode_Failure。

头文件

ets_pstate.h

详情

块(block)提供了对原始文件的抽象。可以把块看作文件的一段(但没有 seek 函数)。通过块存储的数据将是跨平台的。在 Windows 平台上向块写入一个整数,在 Linux 平台上运行时仍能正确读取。

在以下任一情况下,Read 都会返回 EtsC_Compcode_Failure:

  • 块中已没有剩余数据
  • 目标变量的指针为空
  • 块句柄无效

如果发生失败,将发出一个可恢复错误。

没有 seek 函数;不过,块(很可能)会被缓存在内存中。

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com