XROAD
fix_parser.h File Reference
#include <common/xroad_common_types.h>
#include "fix_error.h"
#include "fix_parser_fwd.h"
#include <stdint.h>
#include <stdlib.h>
Include dependency graph for fix_parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fix_parser_attrs_s
 

Macros

#define FIX_PARSER_FLAG_IGNORE_EMPTY   0x01
 

Typedefs

typedef struct fix_parser_attrs_s fix_parser_attrs_t
 

Functions

fix_parser_tfix_parser_create (const fix_parser_attrs_t *attrs, fix_error_t **error)
 
void fix_parser_destroy (fix_parser_t *parser)
 
void * fix_parser_str_to_msg (fix_parser_t *parser, xroad_str_t str, int32_t flags, const char **stop, fix_error_t **error)
 
xroad_errno_t fix_parser_msg_to_str (void *msg, char *buf, uint32_t buf_len, uint32_t *req_buf_len, fix_error_t **error)
 

Detailed Description

Function Documentation

◆ fix_parser_create()

fix_parser_t* fix_parser_create ( const fix_parser_attrs_t attrs,
fix_error_t **  error 
)

create new parser instance

Parameters
[in]attrs- parser attributes
[out]error- error, if any
Returns
new instance of FIX parser, NULL - see error for details

◆ fix_parser_destroy()

void fix_parser_destroy ( fix_parser_t parser)

destroy parser instance.

Parameters
[in]parser- pointer to parser instance

◆ fix_parser_msg_to_str()

xroad_errno_t fix_parser_msg_to_str ( void *  msg,
char *  buf,
uint32_t  buf_len,
uint32_t *  req_buf_len,
fix_error_t **  error 
)

convert FIX message to string

Parameters
[in]msg- message to be converted
[out]buff- buffer with converted message
[out]buf_len- length of output buffer
[out]req_buf_len- if buff length too small, reqBuffLen returns length of needed space
[out]error- error description
Returns
XROAD_OK - OK XROAD_NO_MORE_RESOURCES - see reqBuffLen for required space XROAD_FAILED - error description

◆ fix_parser_str_to_msg()

void* fix_parser_str_to_msg ( fix_parser_t parser,
xroad_str_t  str,
int32_t  flags,
const char **  stop,
fix_error_t **  error 
)

parse FIX encoded message

Parameters
[in]parser- instance of FIX parser
[in]str- pointer to data win FIX message
[in]flags- message parsing flags
[out]stop- pointer to position in data, where parsing is stopped
[out]error- error, if any
Returns
ptr to FIX message, NULL - see error for details