Files
externals/linux/include/celoxica/gmac_object.h
T
2017-10-04 14:16:02 -04:00

50 lines
1.4 KiB
C

#ifndef GMAC_INCLUDE_GMAC_OBJECT_H_
#define GMAC_INCLUDE_GMAC_OBJECT_H_
#include <stddef.h>
#include <stdint.h>
/**
* GMAC Object that are accessible to clients
*/
#ifndef GMAC_UNUSED
#define GMAC_UNUSED __attribute__((unused))
#endif
typedef enum
{
GMAC_OBJ_ROOT, ///< The root is GMACHandle parent of all objects
GMAC_OBJ_MARKET, ///< Object represent different markets read from gmac configuration
GMAC_OBJ_QUEUE, ///< Object represent different reading queues opened
GMAC_OBJ_SRC_CHANNEL, ///< Object represent data source as GMAC input it could be
///< a UDP multicast , TCP channel, a referential file.
GMAC_OBJ_DST_CHANNEL, ///< Object reprensent a gmac output channel,
///< a channel with one incremental squence number
///< as you receive in GMACPacketHeader (MulticastID)
GMAC_OBJ_MAX
} GMACObjType;
typedef struct
{
GMACObjType Type;
const char* Description;
} GMACObjectTypeDesc_t;
static const GMACObjectTypeDesc_t
GMACObjectTypeToString[] GMAC_UNUSED = {
{GMAC_OBJ_ROOT , "GMAC"},
{GMAC_OBJ_MARKET , "MARKET"},
{GMAC_OBJ_QUEUE , "QUEUE"},
{GMAC_OBJ_SRC_CHANNEL , "SRC_CHANNEL"},
{GMAC_OBJ_DST_CHANNEL , "DST_CHANNEL"},
{GMAC_OBJ_MAX , ""}
};
typedef uint32_t GMACObjID;
#define GMAC_UNDEF_OBJ_ID ~0U
#endif /* GMAC_INCLUDE_GMAC_OBJECT_H_ */