Feature #333

Feature #328: Enduro/X Version 6.0 master task

Callback functions for UBF stream processing

Added by Madars over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:08/15/2018
Priority:Normal (Code 4)Due date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

Implement callback version for following APIs:

ubf.h:extern NDRX_API int Bfprint (UBFH *p_ub, FILE * outf);
ubf.h:extern NDRX_API int Bextread (UBFH * p_ub, FILE *inf);
ubf.h:extern NDRX_API void Bboolpr (char * tree, FILE *outf);
ubf.h:extern NDRX_API int Bread (UBFH * p_ub, FILE * inf);
ubf.h:extern NDRX_API int Bwrite (UBFH *p_ub, FILE * outf);

Functions would look like:

ubf.h:extern NDRX_API int Bfprintcb (UBFH *p_ub, void *dataptr1, int (*p_writef)(char *buffer, void *dataptr1));
ubf.h:extern NDRX_API int Bextreadcb (UBFH * p_ub, void *dataptr1, long (*p_readf)(char *buffer, long bufsz, void *dataptr1));
ubf.h:extern NDRX_API void Bboolprcb (char * tree, void *dataptr1, int (*p_writef)(char *buffer, void *dataptr1));
ubf.h:extern NDRX_API int Breadcb (UBFH * p_ub, void *dataptr1, long (*p_readf)(char *buffer, long bufsz, void *dataptr1));
ubf.h:extern NDRX_API int Bwritecb (UBFH *p_ub, void *dataptr1, int (*p_writef)(char *buffer, void *dataptr1));

return codes for write: EXSUCCEED/EXFAIL
return codes for read: EXFAIL, 0 - EOF, > 0 number of bytes read

These functions would be helpful for high level integrations for example with Java where different interfaces cane be used for read or write data.

History

#1 Updated by Madars over 5 years ago

  • Parent task set to #328

#2 Updated by Madars over 5 years ago

  • Status changed from New to In Progress

#3 Updated by Madars over 5 years ago

  • Description updated (diff)

#4 Updated by Madars over 5 years ago

  • Description updated (diff)

#5 Updated by Madars over 5 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

#6 Updated by Madars over 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF