You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <assert.h>
  4. #include "build/node_api.h"
  5. // sleep
  6. #ifdef _WIN32
  7. #include <Windows.h>
  8. #else
  9. #include <unistd.h>
  10. #endif
  11. int main()
  12. {
  13. void *dora_context = init_dora_context_from_env();
  14. if (dora_context == NULL)
  15. {
  16. fprintf(stderr, "failed to init dora context\n");
  17. return -1;
  18. }
  19. for (char i = 0; i < 10; i++)
  20. {
  21. void *input = dora_next_input(dora_context);
  22. char *data;
  23. size_t data_len;
  24. read_dora_input_data(input, &data, &data_len);
  25. assert(data_len == 0);
  26. char out_id[] = "tick";
  27. dora_send_output(dora_context, out_id, strlen(out_id), &i, 1);
  28. free_dora_input(input);
  29. }
  30. free_dora_context(dora_context);
  31. return 0;
  32. }

DORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed datafl