Ets_State_Block_Int_Read()
Note: Requires OPNET Development Kit
Abstract
Reads integer value from cross-platform block storage.
Syntax
Ets_State_Block_Int_Read (block_hndl, int_ptr)
| Argument | Type | Description |
|---|---|---|
block_hndl |
EtsT_State_Block_Handle |
handle to block of cross-platform data |
int_ptr |
int * |
Pointer to variable where read value is stored |
Return Type
EtsT_Compcode
EtsC_Compcode_Success if read operation was successful, EtsC_Compcode_Failure otherwise.
Header
ets_pstate.h
Details
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 there are no seek functions). Data stored via blocks will be cross-platform. 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 is null
- the block handle is invalid
If there was a failure, a recoverable error will be issued.
There are no seek functions; however, the block will (likely) be cached in memory.