The Sequence Toolkit
www.sequence-toolkit.com
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Typedefs
stk_sequence.h File Reference
#include "stk_common.h"
Include dependency graph for stk_sequence.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STK_SEQUENCE_ID_INVALID   0
 
#define STK_SEQUENCE_TYPE_INVALID   0
 
#define STK_SEQUENCE_TYPE_DATA   1
 
#define STK_SEQUENCE_TYPE_KVPAIR   2
 
#define STK_SEQUENCE_TYPE_MGMT   3
 
#define STK_SEQUENCE_TYPE_REQUEST   4
 
#define STK_SEQUENCE_TYPE_QUERY   5
 
#define STK_SEQUENCE_TYPE_SUBSCRIBE   6
 
#define STK_SEQ_TYPE_TO_STRING(_type)
 

Typedefs

typedef stk_uint64 stk_sequence_id
 
typedef stk_uint16 stk_sequence_type
 
typedef stk_uint16 stk_generation_id
 
typedef void * stk_sequence_metadata_t
 
typedef struct stk_sequence_stct stk_sequence_t
 
typedef struct
stk_sequence_iterator_stct 
stk_sequence_iterator_t
 
typedef stk_ret(* stk_sequence_cb )(stk_sequence_t *seq, void *data, stk_uint64 sz, stk_uint64 user_type, void *clientd)
 

Detailed Description

This header provides the typedefs and definitions required to interface to the Sequence module APIs

Macro Definition Documentation

#define STK_SEQ_TYPE_TO_STRING (   _type)
Value:
_type == STK_SEQUENCE_TYPE_DATA ? "Data" : \
_type == STK_SEQUENCE_TYPE_MGMT ? "Management" : \
_type == STK_SEQUENCE_TYPE_KVPAIR ? "Key/Value Pair" : \
_type == STK_SEQUENCE_TYPE_REQUEST ? "Request" : \
_type == STK_SEQUENCE_TYPE_QUERY ? "Query" : \
""

Macro to ease mapping of types to strings

#define STK_SEQUENCE_ID_INVALID   0

Definition of an invalid Sequence ID

#define STK_SEQUENCE_TYPE_DATA   1

Sequence is a Data sequence

#define STK_SEQUENCE_TYPE_INVALID   0

Invalid Sequence - never used

#define STK_SEQUENCE_TYPE_KVPAIR   2

Sequence is set of Key Value Pairs

#define STK_SEQUENCE_TYPE_MGMT   3

Sequence is Management data

#define STK_SEQUENCE_TYPE_QUERY   5

Sequence is a query (read only request)

#define STK_SEQUENCE_TYPE_REQUEST   4

Sequence is a request

#define STK_SEQUENCE_TYPE_SUBSCRIBE   6

Sequence is a subscription (persistent request)

Typedef Documentation

The generation ID is a 16 bit unsigned number and is used to manage uniqueness of the sequence. For example, data flow modules will bump the generation each time a sequence is sent ensuring each sequeunce sent is uniquely identifed.

See Also
stk_create_sequence()
typedef stk_ret(* stk_sequence_cb)(stk_sequence_t *seq, void *data, stk_uint64 sz, stk_uint64 user_type, void *clientd)

The callback signature to be used for functions being passed to stk_iterate_sequence()

A Sequence ID is a 64 bit unsigned number.

See Also
stk_acquire_sequence_id() and stk_create_sequence()

This defines an iterator to step through each data element in a sequence

See Also
stk_sequence_iterator() and stk_iterate_sequence()

Sequences can store data and meta data. This is the type used to manage meta data. [Meta data is not yet implemented]

This is the Sequence object

See Also
stk_create_sequence()

A Sequence Type defines the type of data contained in the sequence. This is largely left for user usage, though STK defines some typical types.

See Also
stk_create_sequence()