Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't recv the subscriber data from fastdds by websocket. #200

Open
taoyonggang opened this issue Jan 9, 2024 · 2 comments
Open

can't recv the subscriber data from fastdds by websocket. #200

taoyonggang opened this issue Jan 9, 2024 · 2 comments

Comments

@taoyonggang
Copy link

types:
  idls:
    - >
      module cn{
        module seisys {
          module dds {
                @topic
                struct TopicMonInfo{
                     string uuid;       
                     @key short domain;       
                     @key string srcNodeId;   
                     string srcNodeName;     
                     @key string toNodeId;       
                     string toNodeName;    
                     @key string topicName;
                     @key long cycle;        
                     long long  updateTime;   
                     long  nCount;          
                     long  nSize;            
                     short srcType;          
              };
           };
        };
      };

systems:
  dds: 
    type: fastdds
    participant:
      domain_id: 10
      #partition: ["*"] 
    types:
      - cn::seisys::dds::TopicMonInfo


  websocket: 
    type: websocket_server
    participant:
      domain_id: 10
      #partition: ["*"]
    types:
        - cn::seisys::dds::TopicMonInfo
    security: none
    host: 10.10.3.30
    port: 18080

routes:
  websocket_to_dds: 
    from: websocket
    to: dds

  dds_to_websocket: 
    from: dds
    to: websocket

topics:
  #mon_dds_to_websocket: 
  #   {
  #     type: "cn::seisys::dds::TopicMonInfo",
  #     route: dds_to_websocket,
  #     remap: {
  #              dds: { type: "cn::seisys::dds::TopicMonInfo", topic: DataMonitor }
  #            }
  #   }

  mon_websocket_to_dds: {
       type: "cn::seisys::dds::TopicMonInfo",
       partition: ["*"], 
       route: websocket_to_dds,
       remap: {
                dds: { type: "cn::seisys::dds::TopicMonInfo", topic: DataMonitor, partition: ["*"] }
              }

    }

But my c++ sub is ok. The TopicName is not matched.

@taoyonggang
Copy link
Author

There are logs:


#integration-service src/Integration-Service/examples/basic/fastdds_websocket_service_mon.yaml 
[Integration Service][ERROR] [is::core::Search::Implementation::PathSet] Attempting to add a prefix path that is not an absolute path: 'LD_LIBRARY_PATH'.
[Integration Service][INFO] [is::sh::FastDDS::Participant] Created Fast DDS participant 'default_IS-FastDDS-SH_participant' with default QoS attributes and Domain ID: 10
[Integration Service][INFO] [is::sh::FastDDS] Configured!
[Integration Service][ERROR] [is::core::Search::Implementation::PathSet] Attempting to add a prefix path that is not an absolute path: 'LD_LIBRARY_PATH'.
[Integration Service][INFO] [is::sh::WebSocket::Server] Security disabled, creating TCP endpoint...
[Integration Service][INFO] [is::sh::WebSocket::Server] Initializing TCP server on port 18080
[Integration Service][INFO] [is::sh::WebSocket::Server] Configured!
[Integration Service][INFO] [is::sh::FastDDS] Publisher created for topic 'DataMonitor', with type 'cn::seisys::dds::TopicMonInfo'
[Integration Service][INFO] [is::core::Config] [dds SystemHandle] Produced a publisher for the topic 'mon_websocket_to_dds', with message type 'cn::seisys::dds::TopicMonInfo'.
[Integration Service][INFO] [is::core::Config] [websocket SystemHandle] Subscribed to topic 'mon_websocket_to_dds', with message type 'cn::seisys::dds::TopicMonInfo'.
[2024-01-09 15:10:43] [connect] WebSocket Connection [::ffff:10.10.3.30]:44332 v13 "" / 101
[Integration Service][INFO] [is::sh::WebSocket::Server] Opened TCP connection with ID '1'. Number of active TCP connections: 1

@taoyonggang
Copy link
Author

types:
  idls:
    - >
      module cn{
        module seisys {
          module dds {
                @topic
                struct TopicMonInfo{
                     string uuid;        //消息唯一id
                     @key short domain;       //数据所在域
                     @key string srcNodeId;   //原始来源
                     string srcNodeName;     //回复消息来源节点名
                     @key string toNodeId;        //一般此发送的管理节点或者独立专用监控节点
                     string toNodeName;     //回复消息来源节点名
                     @key string topicName;
                     @key long cycle;         //统计周期,单位秒,一般为60 或者 300秒
                     long long  updateTime;   //发送消息时间
                     long  nCount;           //周期内发送总数
                     long  nSize;            //周期内发送总字节数,byte
                     short srcType;          //统计来源,0,未知,1,发送端,2,接收端
              };
           };
        };
      };

systems:
  dds: 
    type: fastdds
    participant:
      domain_id: 10
      partition: ["*"] 
    types:
      - cn::seisys::dds::TopicMonInfo


  websocket: 
    type: websocket_server
    participant:
      domain_id: 10
      partition: ["*"]
    types:
        - cn::seisys::dds::TopicMonInfo
    type-from: dds
    security: none
    host: 10.10.3.30
    port: 18080

routes:
  websocket_to_dds: 
    from: websocket
    to: dds

  dds_to_websocket: 
    from: dds
    to: websocket

topics:
  mon_dds_to_websocket: 
     {
       type: "cn::seisys::dds::TopicMonInfo",
       route: dds_to_websocket,
       remap: {
                dds: { type: "cn::seisys::dds::TopicMonInfo", topic: DataMonitor },
                websocket: {topic: DataMonitor}
              }
     }

  mon_websocket_to_dds: {
       type: "cn::seisys::dds::TopicMonInfo",
       partition: ["*"], 
       route: websocket_to_dds,
       remap: {
                dds: { type: "cn::seisys::dds::TopicMonInfo", topic: DataMonitor, partition: ["*"] },
                websocket: {topic: DataMonitor}
              }

    }

I have update the rmap define. but it also can't receive the DataMonitor topic data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant