#46 FB_SimplePayloadEncoder/Decoder: Implement simple File metric

wont-fix
None
2020-11-16
2020-08-17
i-campbell
No

Find out which metrics and metadata etc are needed for a simple file.
Allow a simple file metric similar to existing simple metrics.

Discussion

  • i-campbell

    i-campbell - 2020-09-15
    • Milestone: FFP: Protobufs full --> 1.0.0.0: basic protobufs
     
  • i-campbell

    i-campbell - 2020-09-15
    • Milestone: 1.0.0.0: basic protobufs --> 2.0.0.0: Protobufs full
     
  • i-campbell

    i-campbell - 2020-09-15

    The interface is already there with the FB_PayloadMetric, so it just needs to be added to the FB_SimplePayloadEncoder and FB_SimplePayloadDecoder.

    1. Implement encoding of meta data, FB_PayloadMetric ~Line233
      currently reads " {info 'TODO: i-campbell: encode meta data}
      //metadata fieldnumber
      //metadatasize
      //metadatavarints.bool * 12off"

    2. Implement an FB_SparkplugFile Encode.

    Pseudocode for encode:
    FB_PayloadMetric.SetDataType(MetricDataType.File);
    FB_PayloadMetric.SetName("NameOfMetric");
    FB_PayloadMetric.SetTimeStamp(sentTime);
    FB_PayloadMetric.SetValueToBytes(fileSizeBytes,pArrayWithFileData,myPayload,BodyPool);
    FB_PayloadMetric.SetMetaData(HasMetaData,MetaData);
    FB_PayloadMetric(xDecode := FALSE, xEncode := TRUE);

    1. Decoding (Refinement required)
     
  • i-campbell

    i-campbell - 2020-11-16
    • status: open --> wont-fix
     

Log in to post a comment.