This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS: OPC UA - ANSI C Stack

Tool/software: TI-RTOS

Hello,

Last time I started a thread for OPC UA. Now I am planning to restart the project. 

As I look around I found to ways to go ahead. One is the purchase license from an SDK Vendor such as Matrikon or implement my own solution. I am waiting for reply from them, because their licensing model is not clear for me.

Right now I like the 2nd option. Do you have any experience with OPC UA ANSI C source? 

What do you think about the OPC UA ANSI C - TI RTOS integration? I don't see any issue that makes the integration impossible. Do you?

Thank you for your reply

  • I'm not familiar with OPC UA. Maybe someone else on this forum has some experience and can comment. I think you should review the TI-RTOS docs and examples and come back with more specific concerns or questions.

    Thanks,
    -Karl-

  • Hello, well I have a specific question.

    I am trying to port the following code section to TI-RTOS:

    OpcUa_StatusCode OpcUa_P_RawSocket_CreateSocketPair(  OpcUa_RawSocket* pRawSocketRead, OpcUa_RawSocket* pRawSocketWrite)
    {
    
          int filedes[2];
          int retval = socketpair(AF_UNIX, SOCK_STREAM, 0, filedes);
        
          if(retval<0)
          {
            *pRawSocketRead  = (OpcUa_RawSocket)OPCUA_P_SOCKET_INVALID;
            *pRawSocketWrite = (OpcUa_RawSocket)OPCUA_P_SOCKET_INVALID;
            return OpcUa_Bad;
          }
        
          *pRawSocketRead  = (OpcUa_RawSocket)filedes[1];
          *pRawSocketWrite = (OpcUa_RawSocket)filedes[0];
          
           return OpcUa_Good;
    }
    
    
    
    

    And my problem is how can I implement socketpair() in RTOS? Any idea?

  • Daniel Vamos said:
    And my problem is how can I implement socketpair() in RTOS?

    Found an example of how to implement socketpair() using socket primitives, albeit in Python rather than C - https://gist.github.com/geertj/4325783

    Does that help?