Exemplo n.º 1
0
 def dr_data(self):
     data = IotNvpSeq()
     data.append(IotNvp('engine_id', self._engine_id))
     data.append(IotNvp('stream_id', self._stream_id))
     data.append(IotNvp('frame_id', self._frame_id))
     nvp_seq = IotNvpSeq()
     for value in self._data:
         iot_value = IotValue()
         iot_value.nvp_seq = value.dr_data
         it = IotNvp()
         it.value = iot_value
         nvp_seq.push_back(it)
     seq_value = IotValue()
     seq_value.nvp_seq = nvp_seq
     data.append(IotNvp('data', seq_value))
     return data
Exemplo n.º 2
0
 def add_data(self, value: PyClassificationData) -> None:
     seq = value.dr_data
     classification_value = IotValue()
     classification_value.nvp_seq = seq
     classification_data: IotNvp = IotNvp()
     classification_data.value = classification_value
     self.__data.push_back(classification_data)
Exemplo n.º 3
0
 def dr_data(self) -> IotNvpSeq:
     data = IotNvpSeq()
     data.append(IotNvp('engine_id', self.__engine_id))
     data.append(IotNvp('frame_id', self.__frame_id))
     dbox_value = IotValue()
     dbox_value.nvp_seq = self.__data
     data.append(IotNvp('detection_box_data', dbox_value))
     return data
Exemplo n.º 4
0
 def dr_data(self) -> IotNvpSeq:
     data = IotNvpSeq()
     data.append(IotNvp('engine_id', self.__engine_id))
     data.append(IotNvp('frame_id', self.__frame_id))
     data.append(IotNvp('model_id', self.__model_id))
     value = IotValue()
     value.nvp_seq = self.__data
     data.append(IotNvp('classification_data', value))
     return data