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).
Header
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_Failurein any of the following situations:- there is no more data left in the block
- the pointer for the target variable (
string_size_ptrfor this function) is null - the block handle is invalid
- If there was a failure, a recoverable error will be issued.