Ticket #63: EoN: NDATA puts elements into a second list discussion

Page 1.0 of 1.2
  • aliazzz

    aliazzz - 2020-10-02
    • status: open --> accepted
     
  • aliazzz

    aliazzz - 2020-10-02

    This ticket is implemented but also bring hurdles we did not see.

    Problem:
    1) The NDATA Encoder is not initialised(!) so when we detect changes to data we add them to the not initialised encoder.
    2) The encoder thus throws a "NotEnoughPayload..."
    3) more issue's down the road which involve wrong order initialisation.

    Solution:
    Revision of (NDATA) sending strategy:

    BEFORE detection of changed data we must initialise the NDATA payload to accept data.
    Add a new method named (some suggestions) might be

    SparkPlugBSimple.PrepareNDATA( AllMetricsList );
    

    or
    SparkPlugBSimple.InitNDATA( AllMetricsList );

    Then, if data CHANGES are detected we accept the changed values during this single cycle into the encoder (we take a 'data snapshot') during this cycle.

    After this we BLOCK the change detection during the "Publish Period Blocking Time" so the Encoder will not receive changes during the block period(!)

    Then we SEND the payload immediately also DURING this BLOCK period (at start of)
    via the excisting albeit refactored method:

    SparkPlugBSimple.PublishNDATA( Enable, AllMetricsList );
    

    Summed up in short
    1) Init Encoder in ususual way,
    2) ChangeDetection (adds data to internal encoder),
    3) Block ChangeDetection and immediately Send Payload,
    4) Repeat from step 1.

     
  • i-campbell

    i-campbell - 2020-10-03

    Fixed minor issue with calling InitEncoder, which increases the seq by 1, even if no changes were detected. (Now only calls it once).

     
  • i-campbell

    i-campbell - 2020-10-03
    • status: accepted --> closed
     

Log in to post a comment.