Ets_State_Block_String_Size_Read()

Note: Requires OPNET Development Kit

Abstract

Gets the size of the upcoming string in the specified state block.

Syntax

Ets_State_Block_String_Size_Read (block_hndl, string_size_ptr)
Argument Type Description
block_hndl EtsT_State_Block_Handle The state block to be read from
string_size_ptr int * Pointer to the size of the upcoming string.

Return Type

EtsT_Compcode

EtsC_Compcode_Success if successful; EtsC_Compcode_Failure otherwise (see Details).

ets_pstate.h

Details

This function places the size of the next string in the client state block (minus 1 for the terminating null) into string_size_ptr.

The following information is common to all Ets_State_Block_<…>_Read() functions:

  • Blocks provide an abstraction away from a raw file. A block can be thought of as if it were a piece of a file (but without seek functions). Data stored via blocks will be cross-platform, so writing an integer to a block on a Windows platform will read in correctly when running on a Linux platform.
  • Read will return EtsC_Compcode_Failure in any of the following situations:
    • there is no more data left in the block
    • the pointer for the target variable (string_size_ptr for this function) is null
    • the block handle is invalid
  • If there was a failure, a recoverable error will be issued.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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