Some question about nvmsgconv.cpp

• Hardware Platform (Jetson / GPU)
jetson nx
• DeepStream Version
5.1
• Issue Type( questions, new requirements, bugs)
question

hi, when I use deepstream-test5 to send msg , I find a ‘event’ part in received meg:

‘event’: {
‘id’: ‘311eb1d8-cb65-48dc-b506-6ab51eed333d’,
‘type’: ‘entry’
},

I also find this “envent” defined in "source/libs/nvmsgconv.nvmsgcon.cpp " line 320-368.

static JsonObject*
generate_event_object (NvDsMsg2pCtx *ctx, NvDsEventMsgMeta *meta)
{
  JsonObject *eventObj;
  uuid_t uuid;
  gchar uuidStr[37];

  /*
   * "event": {
       "id": "event-id",
       "type": "entry / exit"
     }
   */

  uuid_generate_random (uuid);
  uuid_unparse_lower(uuid, uuidStr);

  eventObj = json_object_new ();
  json_object_set_string_member (eventObj, "id", uuidStr);

  switch (meta->type) {
    case NVDS_EVENT_ENTRY:
      json_object_set_string_member (eventObj, "type", "entry");
      break;
    case NVDS_EVENT_EXIT:
      json_object_set_string_member (eventObj, "type", "exit");
      break;
    case NVDS_EVENT_MOVING:
      json_object_set_string_member (eventObj, "type", "moving");
      break;
    case NVDS_EVENT_STOPPED:
      json_object_set_string_member (eventObj, "type", "stopped");
      break;
    case NVDS_EVENT_PARKED:
      json_object_set_string_member (eventObj, "type", "parked");
      break;
    case NVDS_EVENT_EMPTY:
      json_object_set_string_member (eventObj, "type", "empty");
      break;
    case NVDS_EVENT_RESET:
      json_object_set_string_member (eventObj, "type", "reset");
      break;
    default:
      cout << "Unknown event type " << endl;
      break;
  }

  return eventObj;
}
    • I want to know what the means of [“entry”,“exit”,“moving”, “stopped”,“parked”,…].
    • Is there any relation with anlytics result?

HI,
It’s nothing to do with analytics result, all the values you mentioned generated from function generate_place_object, more specifically, from dsPlaceObj, and this structure filled by from dstest5_msgconv_sample_config.txt place* group

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.