Example #1
0
 def init_payload(self, payload_size):
     payload = IotValue()
     payload.byte_seq = ()
     for i in range(payload_size):
         payload.byte_seq.append(ord('a'))
     
     self._sample_data = IotNvpSeq()
     self._sample_data.append(IotNvp('payload', payload))
Example #2
0
    def init_payload(self, video):
        payload = IotValue()
        payload.byte_seq = []
        #payload.byte_seq.append(video)
        #payload.byte_seq = video

        for i in video:
            #for j in i:
            #for k in j:
            payload.byte_seq.append(int(i))

        #print(len(video))
        self._send_payload = IotNvpSeq()
        self._send_payload.append(IotNvp('video', payload))