Description: This function returns a single byte from a buffer.
Returns: Byte
Usage: Script or Steady State
Format: GetByte(Buffer, Offset)
Parameters: Buffer { buffer } { required } { no default }
Any buffer expression giving the buffer to get the byte from.
Offset { numeric } { required } { no default }
Any numeric expression giving the offset from the start of the buffer in bytes, starting from 0.
Comments: This function is useful for manipulating ASCII text on a byte-by-byte level. For example, examining serial I/O driver response packets.
Example:
oneByte = GetByte(response, 0);
The variable oneByte is set to the ASCII value of the first byte in the text variable response. If response is Invalid, then oneByte will be Invalid. If oneByte is valid, its value will always be in the range 0 to 255.
See Also: