Lines Matching refs:stream
57 #define LOG_NANOPB_ERROR(stream) \ argument
58 LOGE("Nanopb error: %s:%d", PB_GET_ERROR(stream), __LINE__)
144 bool copyPayload(pb_ostream_t *stream, const pb_field_t *field, in copyPayload() argument
149 if (!pb_encode_tag_for_field(stream, field)) { in copyPayload()
150 LOG_NANOPB_ERROR(stream); in copyPayload()
151 } else if (!pb_encode_string(stream, in copyPayload()
154 LOG_NANOPB_ERROR(stream); in copyPayload()
188 pb_ostream_t stream = pb_ostream_from_buffer(msg->get(), *msgLen); in encodeSnsStdAttrReq() local
190 success = pb_encode(&stream, sns_std_attr_req_fields, &req); in encodeSnsStdAttrReq()
192 LOG_NANOPB_ERROR(&stream); in encodeSnsStdAttrReq()
235 pb_ostream_t stream = pb_ostream_from_buffer(msg->get(), *msgLen); in encodeSnsSuidReq() local
237 success = pb_encode(&stream, sns_suid_req_fields, &req); in encodeSnsSuidReq()
239 LOG_NANOPB_ERROR(&stream); in encodeSnsSuidReq()
284 pb_ostream_t stream = pb_ostream_from_buffer(msg->get(), *msgLen); in encodeSnsResamplerConfig() local
286 success = pb_encode(&stream, sns_resampler_config_fields, &req); in encodeSnsResamplerConfig()
288 LOG_NANOPB_ERROR(&stream); in encodeSnsResamplerConfig()
326 pb_ostream_t stream = pb_ostream_from_buffer(msg->get(), *msgLen); in encodeSnsStdSensorConfig() local
328 success = pb_encode(&stream, sns_std_sensor_config_fields, &req); in encodeSnsStdSensorConfig()
330 LOG_NANOPB_ERROR(&stream); in encodeSnsStdSensorConfig()
347 pb_ostream_t stream = pb_ostream_from_buffer(msgBuffer, msgBufferSize); in encodeSnsRemoteProcSensorConfig() local
349 pb_encode(&stream, sns_remote_proc_state_config_fields, &request); in encodeSnsRemoteProcSensorConfig()
351 LOG_NANOPB_ERROR(&stream); in encodeSnsRemoteProcSensorConfig()
353 *msgLen = stream.bytes_written; in encodeSnsRemoteProcSensorConfig()
402 bool decodeStringField(pb_istream_t *stream, const pb_field_t *field, in decodeStringField() argument
405 data->bufLen = stream->bytes_left; in decodeStringField()
406 data->buf = stream->state; in decodeStringField()
408 bool success = pb_read(stream, nullptr /* buf */, stream->bytes_left); in decodeStringField()
410 LOG_NANOPB_ERROR(stream); in decodeStringField()
418 bool decodeSnsSuidEventSuid(pb_istream_t *stream, const pb_field_t *field, in decodeSnsSuidEventSuid() argument
421 bool success = pb_decode(stream, sns_std_suid_fields, &suid); in decodeSnsSuidEventSuid()
423 LOG_NANOPB_ERROR(stream); in decodeSnsSuidEventSuid()
431 bool decodeSnsSuidEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsSuidEvent() argument
449 bool success = pb_decode(stream, sns_suid_event_fields, &event); in decodeSnsSuidEvent()
451 LOG_NANOPB_ERROR(stream); in decodeSnsSuidEvent()
481 bool decodeSnsSuidProtoEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsSuidProtoEvent() argument
488 success = decodeSnsSuidEvent(stream, field, arg); in decodeSnsSuidProtoEvent()
567 bool decodeSnsStdAttrValue(pb_istream_t *stream, const pb_field_t *field, in decodeSnsStdAttrValue() argument
586 success = pb_decode(stream, sns_std_attr_value_data_fields, &data->value); in decodeSnsStdAttrValue()
588 LOG_NANOPB_ERROR(stream); in decodeSnsStdAttrValue()
620 bool decodeSnsStrAttr(pb_istream_t *stream, const pb_field_t *field, in decodeSnsStrAttr() argument
636 success = pb_decode(stream, sns_std_attr_fields, &data->attr); in decodeSnsStrAttr()
638 LOG_NANOPB_ERROR(stream); in decodeSnsStrAttr()
675 bool decodeSnsStdAttrEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsStdAttrEvent() argument
691 success = pb_decode(stream, sns_std_attr_event_fields, &data->event); in decodeSnsStdAttrEvent()
693 LOG_NANOPB_ERROR(stream); in decodeSnsStdAttrEvent()
718 bool decodeSnsStdProtoEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsStdProtoEvent() argument
725 success = decodeSnsStdAttrEvent(stream, field, arg); in decodeSnsStdProtoEvent()
735 success = pb_decode(stream, sns_std_error_event_fields, &event); in decodeSnsStdProtoEvent()
737 LOG_NANOPB_ERROR(stream); in decodeSnsStdProtoEvent()
908 bool decodeFloatData(pb_istream_t *stream, const pb_field_t *field, in decodeFloatData() argument
923 bool success = pb_decode_fixed32(stream, fltPtr); in decodeFloatData()
925 LOG_NANOPB_ERROR(stream); in decodeFloatData()
930 bool decodeSnsStdSensorPhysicalConfigEvent(pb_istream_t *stream, in decodeSnsStdSensorPhysicalConfigEvent() argument
940 pb_decode(stream, sns_std_sensor_physical_config_event_fields, &event); in decodeSnsStdSensorPhysicalConfigEvent()
942 LOG_NANOPB_ERROR(stream); in decodeSnsStdSensorPhysicalConfigEvent()
975 bool decodeSnsStdSensorEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsStdSensorEvent() argument
983 bool success = pb_decode(stream, sns_std_sensor_event_fields, &event); in decodeSnsStdSensorEvent()
985 LOG_NANOPB_ERROR(stream); in decodeSnsStdSensorEvent()
996 bool decodeSnsStdSensorProtoEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsStdSensorProtoEvent() argument
1003 success = decodeSnsStdSensorPhysicalConfigEvent(stream, field, arg); in decodeSnsStdSensorProtoEvent()
1007 success = decodeSnsStdSensorEvent(stream, field, arg); in decodeSnsStdSensorProtoEvent()
1041 bool decodeSnsCalEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsCalEvent() argument
1055 bool success = pb_decode(stream, sns_cal_event_fields, &event); in decodeSnsCalEvent()
1057 LOG_NANOPB_ERROR(stream); in decodeSnsCalEvent()
1087 bool decodeSnsCalProtoEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsCalProtoEvent() argument
1094 success = decodeSnsCalEvent(stream, field, arg); in decodeSnsCalProtoEvent()
1103 bool decodeSnsProximityEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsProximityEvent() argument
1107 bool success = pb_decode(stream, sns_proximity_event_fields, &event); in decodeSnsProximityEvent()
1109 LOG_NANOPB_ERROR(stream); in decodeSnsProximityEvent()
1121 bool decodeSnsProximityProtoEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsProximityProtoEvent() argument
1128 success = decodeSnsProximityEvent(stream, field, arg); in decodeSnsProximityProtoEvent()
1137 bool decodeSnsResamplerConfigEvent(pb_istream_t *stream, in decodeSnsResamplerConfigEvent() argument
1141 bool success = pb_decode(stream, sns_resampler_config_event_fields, &event); in decodeSnsResamplerConfigEvent()
1143 LOG_NANOPB_ERROR(stream); in decodeSnsResamplerConfigEvent()
1156 bool decodeSnsResamplerProtoEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsResamplerProtoEvent() argument
1163 success = decodeSnsResamplerConfigEvent(stream, field, arg); in decodeSnsResamplerProtoEvent()
1172 bool decodeSnsRemoteProcStateEvent(pb_istream_t *stream, in decodeSnsRemoteProcStateEvent() argument
1175 bool success = pb_decode(stream, sns_remote_proc_state_event_fields, &event); in decodeSnsRemoteProcStateEvent()
1177 LOG_NANOPB_ERROR(stream); in decodeSnsRemoteProcStateEvent()
1189 bool decodeSnsRemoteProcProtoEvent(pb_istream_t *stream, in decodeSnsRemoteProcProtoEvent() argument
1195 success = decodeSnsRemoteProcStateEvent(stream, field, arg); in decodeSnsRemoteProcProtoEvent()
1205 bool decodeSnsAmdProtoEvent(pb_istream_t *stream, const pb_field_t *field, in decodeSnsAmdProtoEvent() argument
1211 if (!pb_decode(stream, sns_amd_event_fields, &event)) { in decodeSnsAmdProtoEvent()
1212 LOG_NANOPB_ERROR(stream); in decodeSnsAmdProtoEvent()
1287 bool decodeMsgIdAndTime(pb_istream_t *stream, uint32_t *msgId, in decodeMsgIdAndTime() argument
1292 pb_decode(stream, sns_client_event_msg_sns_client_event_fields, &event); in decodeMsgIdAndTime()
1294 LOG_NANOPB_ERROR(stream); in decodeMsgIdAndTime()
1305 bool decodeSnsClientEventMsg(pb_istream_t *stream, const pb_field_t *field, in decodeSnsClientEventMsg() argument
1308 pb_istream_t streamCpy = *stream; in decodeSnsClientEventMsg()
1311 bool success = decodeMsgIdAndTime(stream, &info->msgId, &info->data->timeNs); in decodeSnsClientEventMsg()
1530 pb_istream_t stream = pb_istream_from_buffer( in handleSnsClientEventMsg() local
1534 pb_istream_t streamCpy = stream; in handleSnsClientEventMsg()
1558 if (!pb_decode(&stream, sns_client_event_msg_fields, &data->event)) { in handleSnsClientEventMsg()
1559 LOG_NANOPB_ERROR(&stream); in handleSnsClientEventMsg()