Skip to content

arienchen/pytibrv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytibrv

TIBCO Rendezvous® API for Python

TIBCO Rendezvous® is copyright of TIBCO www.tibco.com


  1. pytibrv is a Python wraper to TIBRV/C API. it use ctypes rather than Python Extension.
    If low-latency is the main issue, please use C API, not in Python.
  2. Develop and test for Python3.5+, not support for Python2
  3. pytibrv follow the naming convension of TIBRV/C
    ex:
    CPython
    typedef int tibrv_statustibrv_status = int
    tibrv_status tibrv_Open()def tibrv_Open() -> tibrv_status:
    tibrv_status tibrv_Close()def tibrv_Close() -> tibrv_status:
    const cahr * tibrv_Version()def tibrv_Version() -> str:

  4. TIBRV/C use POINTER to return object
    ex:
    TIBRV/C
    tibrv_statue tibrvMsg_Create(tibrvMsg * msg)
    ... tibrv_status status; tibrvMsg msg;

    status = tibrvMsg_Create(&msg) if (TIBRV_OK != status) {

    error handling

    }

    Python support multiple return

    def tibrvMsg_Create() -> (tibrv_status, tibrvMsg):
      ...
    
    # create msg
    # you could check status == TIBRV_OK or msg == None 
    status, msg = tibrvMsg_Create()
    if status != TIBRV_OK:
      # error handling
    
    if msg is None:
      # error handling
      
    

TO BE CONTINUE