Ets_State_Block_String_Read()
Note: Requires OPNET Development Kit
Abstract
Gets the upcoming string in the specified state block.
Syntax
Ets_State_Block_String_Read (block_hndl, string_buf)
| Argument | Type | Description |
|---|---|---|
block_hndl |
EtsT_State_Block_Handle |
The state block to be read from |
string_buf |
char * |
Buffer for the upcoming string. |
Return Type
EtsT_Compcode
EtsC_Compcode_Success if the read is successful; EtsC_Compcode_Failure otherwise (see Details).
Header
ets_pstate.h
Details
Fills in the next string in the client state block into string_buf. The string_buf must be long enough to accommodate the string in the state block.
You may want to call Ets_State_Block_String_Size_Read() to get the size of the string to be read before calling this function.
The following information is common to all Ets_State_Block_<something>_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 is null
- the block handle is invalid
- If there was a failure, a recoverable error will be issued.