resUpdateGoGPSUpBodyListWithHeaderPeakSwim function

void resUpdateGoGPSUpBodyListWithHeaderPeakSwim(
  1. Pointer<PERIPHERAL_GOGPS_HEADER_SWIM> pGogpsHeader_Swim,
  2. Pointer<PERIPHERAL_GOGPS_BODY_PEAK_SWIM> pGoGPSBody,
  3. int size,
  4. int bHeaderUpdated,
)

Implementation

void resUpdateGoGPSUpBodyListWithHeaderPeakSwim(
    Pointer<PERIPHERAL_GOGPS_HEADER_SWIM> pGogpsHeader_Swim,
    Pointer<PERIPHERAL_GOGPS_BODY_PEAK_SWIM> pGoGPSBody,
    int size,
    int bHeaderUpdated) {

  slog('resUpdateGoGPSUpBodyListWithHeaderPeakSwim: entered');
  slog("resUpdateGoGPSUpBodyListWithHeaderPeakSwim size: $size, bHeaderUpdated: $bHeaderUpdated");
  String strGogpsHeader_Swim = pGogpsHeader_Swim.ref.toString();
  slog("get PERIPHERAL_GOGPS_HEADER_SWIM: $strGogpsHeader_Swim");
  String strGoGPSBody = pGoGPSBody.ref.toString();
  slog("get PERIPHERAL_GOGPS_BODY_PEAK_SWIM: $strGoGPSBody");

  //header
  final header =   CLCmdGogpsHeaderV2.fromSwim(pGogpsHeader_Swim.ref);

  updateGoGpsHeader(header,bHeaderUpdated);

  // CLCmdGogpsHeaderV2.subject.add(header);

  //body
  if( size>0 ) {
    for (int i = 0; i < size; i++) {
      final bodyItem = CLCmdGogpsBodyPeakSwim.from(pGoGPSBody[i]);
      var translateItem = updateGoGPSUpBodyEntrySwim(bodyItem);
      //接口回调
      (translateItem != null) ? CLCmdGoGpsUpStreamData.subject.add(
          translateItem) : {};
    }
  }
}