aura  0.1
 All Data Structures Functions Variables Modules Pages
Parsing return values

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_bufferaura_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)
 

Detailed Description

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.

Function Documentation

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.

Parameters
bufaura buffer
lendata 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.

Parameters
bufaura buffer
lendata 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.

Parameters
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.

Parameters
buf
Returns
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.

Parameters
buf
Returns
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.

Parameters
buf
Returns
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.

Parameters
buf
Returns
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.

Parameters
buf
Returns
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.

Parameters
buf
Returns
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.

Parameters
buf
Returns
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.

Parameters
buf
Returns
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.

Parameters
bufaura buffer
datadata buffer
lendata 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.

Parameters
buf
value
Returns
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.

Parameters
buf
value
Returns
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.

Parameters
buf
value
Returns
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.

Parameters
buf
value
Returns
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.

Parameters
buf
value
Returns
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.

Parameters
buf
value
Returns
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.

Parameters
buf
value
Returns
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.

Parameters
buf
value
Returns