aura
0.1
|
Functions | |
uint8_t | aura_buffer_get_u8 (struct aura_buffer *buf) |
Get an unsigned 8 bit integer from aura buffer. More... | |
uint16_t | aura_buffer_get_u16 (struct aura_buffer *buf) |
Get an unsigned 16 bit integer from aura buffer. More... | |
uint32_t | aura_buffer_get_u32 (struct aura_buffer *buf) |
Get an unsigned 32 bit integer from aura buffer. More... | |
uint64_t | aura_buffer_get_u64 (struct aura_buffer *buf) |
Get an unsigned 64 bit integer from aura buffer. More... | |
int8_t | aura_buffer_get_s8 (struct aura_buffer *buf) |
Get a signed 8 bit integer from aura buffer. More... | |
int16_t | aura_buffer_get_s16 (struct aura_buffer *buf) |
Get a signed 16 bit integer from aura buffer. More... | |
int32_t | aura_buffer_get_s32 (struct aura_buffer *buf) |
Get a signed 32 bit integer from aura buffer. More... | |
int64_t | aura_buffer_get_s64 (struct aura_buffer *buf) |
Get a signed 64 bit integer from aura buffer. More... | |
void | aura_buffer_put_u8 (struct aura_buffer *buf, uint8_t value) |
Put an unsigned 8 bit integer to aura buffer. More... | |
void | aura_buffer_put_u16 (struct aura_buffer *buf, uint16_t value) |
Put an unsigned 16 bit integer to aura buffer. More... | |
void | aura_buffer_put_u32 (struct aura_buffer *buf, uint32_t value) |
Put an unsigned 32 bit integer to aura buffer. More... | |
void | aura_buffer_put_u64 (struct aura_buffer *buf, uint64_t value) |
Put an unsigned 64 bit integer to aura buffer. More... | |
void | aura_buffer_put_s8 (struct aura_buffer *buf, int8_t value) |
Put a signed 8 bit integer to aura buffer. More... | |
void | aura_buffer_put_s16 (struct aura_buffer *buf, int16_t value) |
Put a signed 16 bit integer to aura buffer. More... | |
void | aura_buffer_put_s32 (struct aura_buffer *buf, int32_t value) |
Put a signed 32 bit integer to aura buffer. More... | |
void | aura_buffer_put_s64 (struct aura_buffer *buf, int64_t value) |
Put a signed 64 bit integer to aura buffer. More... | |
const void * | aura_buffer_get_bin (struct aura_buffer *buf, int len) |
Get a pointer to the binary data block within buffer and advance internal pointer by len bytes. The data in the buffer is managed internally and should not be freed by the caller. More... | |
void | aura_buffer_put_bin (struct aura_buffer *buf, const void *data, int len) |
Copy data of len bytes to aura buffer from a buffer pointed by data. More... | |
struct aura_buffer * | aura_buffer_get_buf (struct aura_buffer *buf) |
Retrieve aura_buffer pointer from within the buffer and advance internal pointer by it's size. More... | |
const void * | aura_buffer_get_ptr (struct aura_buffer *buf) |
Events and methods deliver data in a struct aura_buffer that should be used as opaque type. The functions documented in this section should be used to parse the buffer obtained from a device. These functions take care to swap endianness if required.
Aura buffers have internal pointer that is advanced by the number of bytes required when each argument is read out. Attempting to cross the buffer boundary will result in aura_panic() on the relevant node.
Although you may normally never need those, for some cases (e.g. writing bindings) a set of functions is provided to put values into aura buffers.
const void* aura_buffer_get_bin | ( | struct aura_buffer * | buf, |
int | len | ||
) |
Get a pointer to the binary data block within buffer and advance internal pointer by len bytes. The data in the buffer is managed internally and should not be freed by the caller.
This function will cause a panic if attempted to read beyond the buffer boundary.
buf | aura buffer |
len | data length |
Definition at line 60 of file retparse.c.
References aura_buffer::data, aura_buffer::owner, aura_buffer::pos, and aura_buffer::size.
struct aura_buffer* aura_buffer_get_buf | ( | struct aura_buffer * | buf | ) |
Retrieve aura_buffer pointer from within the buffer and advance internal pointer by it's size.
The underlying transport must support passing aura_buffer as arguments
This function will cause a panic if attempted to read beyond the buffer boundary.
buf | aura buffer |
len | data length |
Definition at line 83 of file retparse.c.
References aura_buffer::magic, and aura_buffer::owner.
const void* aura_buffer_get_ptr | ( | struct aura_buffer * | buf | ) |
Retrieve transport-specific pointer from aura buffer. Handling of this data-type is transport specific.
buf |
int16_t aura_buffer_get_s16 | ( | struct aura_buffer * | buf | ) |
Get a signed 16 bit integer from aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf |
int32_t aura_buffer_get_s32 | ( | struct aura_buffer * | buf | ) |
Get a signed 32 bit integer from aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyound the buffer boundary.
buf |
int64_t aura_buffer_get_s64 | ( | struct aura_buffer * | buf | ) |
Get a signed 64 bit integer from aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf |
int8_t aura_buffer_get_s8 | ( | struct aura_buffer * | buf | ) |
Get a signed 8 bit integer from aura buffer.
This function will cause a panic if attempted to read beyond the buffer boundary.
buf |
uint16_t aura_buffer_get_u16 | ( | struct aura_buffer * | buf | ) |
Get an unsigned 16 bit integer from aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf |
uint32_t aura_buffer_get_u32 | ( | struct aura_buffer * | buf | ) |
Get an unsigned 32 bit integer from aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf |
uint64_t aura_buffer_get_u64 | ( | struct aura_buffer * | buf | ) |
Get an unsigned 64 bit integer from aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf |
uint8_t aura_buffer_get_u8 | ( | struct aura_buffer * | buf | ) |
Get an unsigned 8 bit integer from aura buffer.
This function will cause a panic if attempted to read beyond the buffer boundary.
buf |
void aura_buffer_put_bin | ( | struct aura_buffer * | buf, |
const void * | data, | ||
int | len | ||
) |
Copy data of len bytes to aura buffer from a buffer pointed by data.
This function will advance internal aura_buffer pointer by len bytes.
This function will cause a panic if attempted to read beyond the buffer boundary.
buf | aura buffer |
data | data buffer |
len | data length |
Definition at line 71 of file retparse.c.
References aura_buffer::data, aura_buffer::owner, aura_buffer::pos, and aura_buffer::size.
void aura_buffer_put_s16 | ( | struct aura_buffer * | buf, |
int16_t | value | ||
) |
Put a signed 16 bit integer to aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf | |
value |
void aura_buffer_put_s32 | ( | struct aura_buffer * | buf, |
int32_t | value | ||
) |
Put a signed 32 bit integer to aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyound the buffer boundary.
buf | |
value |
void aura_buffer_put_s64 | ( | struct aura_buffer * | buf, |
int64_t | value | ||
) |
Put a signed 64 bit integer to aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf | |
value |
void aura_buffer_put_s8 | ( | struct aura_buffer * | buf, |
int8_t | value | ||
) |
Put a signed 8 bit integer to aura buffer.
This function will cause a panic if attempted to read beyond the buffer boundary.
buf | |
value |
void aura_buffer_put_u16 | ( | struct aura_buffer * | buf, |
uint16_t | value | ||
) |
Put an unsigned 16 bit integer to aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf | |
value |
void aura_buffer_put_u32 | ( | struct aura_buffer * | buf, |
uint32_t | value | ||
) |
Put an unsigned 32 bit integer to aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf | |
value |
void aura_buffer_put_u64 | ( | struct aura_buffer * | buf, |
uint64_t | value | ||
) |
Put an unsigned 64 bit integer to aura buffer.
This function will swap endianness if needed. This function will cause a panic if attempted to read beyond the buffer boundary.
buf | |
value |
void aura_buffer_put_u8 | ( | struct aura_buffer * | buf, |
uint8_t | value | ||
) |
Put an unsigned 8 bit integer to aura buffer.
This function will cause a panic if attempted to read beyond the buffer boundary.
buf | |
value |