This function returns a variable u8 read from a buffer at the specified offset.
Syntax |
u8 get_u8 (buff, i32 offset) |
---|---|
buff |
Can be an array, structure, or register |
offset |
Offset in bytes to which you want to read |
Result |
Returns the value read |
Validity |
Rule, Task |
Note |
No range check is performed, it is up to the user to check that adding the offset and the data size does not exceed the maximum buffer size |
NOTE: If the user wishes to extract a byte from the buffer of a structure of type bbc_msguser then the user must use the function bcc_get_u8().
Example usage: Once you have loaded the example program on a control, via a shell you can verify the functioning of get_u8(). To do this, set a value ((0-:-127) - sizeof(my_data)) to the offset variable, then set a non-zero value to set_val and verify that the variable my_data is equal to set_val. |