# Copyright (c) 2023, AgiBot Inc.
# All rights reserved.

aimrt:
  plugin:
    plugins:
      - name: net_plugin
        path: ./libaimrt_net_plugin.so
        options:
          thread_num: 4
          http_options:
            listen_ip: 127.0.0.1
            listen_port: 50080
      - name: record_playback_plugin
        path: ./libaimrt_record_playback_plugin.so
        options:
          type_support_pkgs:
            - path: ./libexample_event_ts_pkg.so
          playback_actions:
            - name: my_signal_playback
              options:
                bag_path: ./bag/aimrtbag_yyyymmdd_hhmmss # replace with your bag path
                mode: signal # imd/signal
                executor: playback_thread_pool # require support time schedule!
                topic_meta_list:
                  - topic_name: test_topic
                    msg_type: pb:aimrt.protocols.example.ExampleEventMsg
  log:
    core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off
    backends:
      - type: console
  executor:
    executors:
      - name: playback_thread_pool
        type: asio_thread
        options:
          thread_num: 4
      - name: work_thread_pool
        type: asio_thread
        options:
          thread_num: 4
  channel:
    backends:
      - type: local
        options:
          subscriber_use_inline_executor: false
          subscriber_executor: work_thread_pool
    pub_topics_options:
      - topic_name: "(.*)"
        enable_backends: [local]
    sub_topics_options:
      - topic_name: "(.*)"
        enable_backends: [local]
  rpc:
    backends:
      - type: http
    servers_options:
      - func_name: "(pb:/aimrt.protocols.record_playback_plugin.*)"
        enable_backends: [http]
  module:
    pkgs:
      - path: ./libpb_chn_sub_pkg.so
        enable_modules: [NormalSubscriberModule]
    modules:
      - name: NormalSubscriberModule
        log_lvl: INFO

# Module custom configuration
NormalSubscriberModule:
  topic_name: test_topic
