#include "types.h"
Include dependency graph for fastapi.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | fast_cv_t |
struct | fast_pmap_t |
struct | fast_buffer_t |
struct | fast_codec_error_t |
struct | fast_codec_t |
Defines | |
#define | _fastapi_h_ 1 |
#define | STR_ARGS(_x) _x, sizeof (_x) |
#define | TAG_MAX_SLOT 0xff |
#define | TAG_MAX_TID 0xf |
#define | TAG_MAX_OP 0xf |
#define | TAG_MAX_TYPE 0xf |
#define | TAG_SHIFT_SLOT 0 |
#define | TAG_SHIFT_TID 12 |
#define | TAG_SHIFT_OP 24 |
#define | TAG_SHIFT_TYPE 28 |
#define | MAKE_TAG(type, op, tid, slot) |
#define | MAX_TAG 64 |
#define | MAX_TID 4 |
#define | MAX_PMAP_BYTES 8 |
#define | MAX_PMAP_BITS (7 * MAX_PMAP_BYTES) |
#define | MAX_MSG_SIZE 2048 |
#define | FAST_CODEC_MAGIC 0xC0DEC |
Typedefs | |
typedef unsigned int | fast_tag_t |
Enumerations | |
enum | fast_op_t { FAST_OP_NONE = 0, FAST_OP_COPY, FAST_OP_INCR, FAST_OP_DELTA } |
enum | fast_type_t { FAST_TYPE_NULL = 0, FAST_TYPE_U32, FAST_TYPE_I32, FAST_TYPE_STR } |
enum | fast_error_t { FAST_ERR_NONE = 0, FAST_ERR_CODEC = -1, FAST_ERR_SIZE = -2, FAST_ERR_VALUE = -3, FAST_ERR_TAG_OP = -4, FAST_ERR_TAG_TYPE = -5, FAST_ERR_CALL_SEQ = -6, FAST_ERR_IO = -7 } |
Functions | |
fast_codec_t * | fast_create_codec (void) |
Create and initialize the codec. | |
int | fast_destroy_codec (fast_codec_t *codec) |
Destroy the codec and release associated memory. | |
void | fast_reset_state (fast_codec_t *codec, fast_tag_t tag) |
Reset the codec state for a specific tag. | |
int | fast_set_codec_input (fast_codec_t *codec, FILE *fptr) |
Set the input FILE stream for a codec. | |
int | fast_set_codec_output (fast_codec_t *codec, FILE *fptr) |
Set the output FILE stream for a codec. | |
fast_tag_t | fast_make_tag (fast_op_t, fast_type_t, u32 tid, u32 slot) |
Make a FAST tag. | |
int | fast_decode_new_msg (fast_codec_t *codec, fast_tag_t tag) |
Decode the first tag of a new message. | |
int | fast_decode_end_msg (fast_codec_t *codec, fast_tag_t tag) |
Complete the decoding of a message. | |
int | fast_decode_i32 (fast_codec_t *codec, fast_tag_t tag, i32 *data) |
Decode a 32-bit signed integer. | |
int | fast_decode_u32 (fast_codec_t *codec, fast_tag_t tag, u32 *data) |
Decode a 32-bit unsigned integer. | |
int | fast_decode_str (fast_codec_t *codec, fast_tag_t tag, u8 *data, int size) |
Decode an ASCII String. | |
int | fast_encode_new_msg (fast_codec_t *codec, fast_tag_t tag) |
Encode the first tag of a new message. | |
int | fast_encode_end_msg (fast_codec_t *codec, fast_tag_t tag) |
Complete the encoding of a message. | |
int | fast_encode_i32 (fast_codec_t *codec, fast_tag_t tag, i32 data) |
Encode a 32-bit signed integer. | |
int | fast_encode_u32 (fast_codec_t *codec, fast_tag_t tag, u32 data) |
Encode a 32-bit unsigned integer. | |
int | fast_encode_str (fast_codec_t *codec, fast_tag_t tag, u8 *data, int size) |
Encode an ASCII String. | |
int | fast_print_error (fast_codec_t *codec, FILE *fptr) |
Format and print the last reported codec error to a human readable string to a FILE stream. | |
const char * | fast_error_string (fast_codec_t *codec) |
Convert the last reported codec error to a human readable string. | |
u32 | fast_ascii_to_u32 (u8 *data, int size) |
Convert a u8 byte arrray of characters to a u32. |
|
|
|
Definition at line 132 of file fastapi.h. Referenced by check_codec(), fast_create_codec(), and fast_destroy_codec(). |
|
Value: (((type) << TAG_SHIFT_TYPE) | ((op) << TAG_SHIFT_OP) | \ ((tid) << TAG_SHIFT_TID) | ((slot) << TAG_SHIFT_SLOT))
|
|
|
|
Definition at line 82 of file fastapi.h. Referenced by reset_pmap(), and set_pmap(). |
|
Definition at line 81 of file fastapi.h. Referenced by flush_group(), and parse_pmap(). |
|
|
|
|
|
|
|
Definition at line 64 of file fastapi.h. Referenced by get_tag_op(). |
|
Definition at line 62 of file fastapi.h. Referenced by get_tag_slot(). |
|
Definition at line 63 of file fastapi.h. Referenced by get_tag_tid(). |
|
Definition at line 65 of file fastapi.h. Referenced by get_tag_type(). |
|
Definition at line 69 of file fastapi.h. Referenced by get_tag_op(). |
|
Definition at line 67 of file fastapi.h. Referenced by get_tag_slot(). |
|
Definition at line 68 of file fastapi.h. Referenced by get_tag_tid(). |
|
Definition at line 70 of file fastapi.h. Referenced by get_tag_type(). |
|
|
|
|
|
|
|
|