--- old+++ new@@ -4,17 +4,33 @@
The FB contains a protobuf blob encoder and various methods to quickly create (compose and/or encode) various messages.
Messages which are mandatory for this FB are:
-[ ] Node Death Message-[ ] Node Birth Message-[ ] Device Death Message-[ ] Device Birth Message+ [ ] Node Death Message+ [ ] Node Birth Message+ [ ] Device Death Message+ [ ] Device Birth Message
Since this FB is of the simple variant, it can can only deal with the SimpleObjects type.
Pass a single instance of SimpleObject to the Encoder.
-[ ] AddMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.-[ ] AddMetric( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder+ [ ] AddMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.+ [ ] AddMetric( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder++Apart from these methods it contains various interactions / diagnosis+ [ ] Diag // Diagnosis+ [ ] Encode // Start Encoding+ [ ] Encoded // Is encoding finished?+ [ ] EncoderBusy // Is the encoder busy on a task?+ [ ] EncoderError // An error occured+ [ ] FlushPool // Removes all poolElements();+// Updates timestamp();+// Initializes the PayloadEncoder+ + [ ] GetBDSeqNum+ [ ] getSeqNum+ [ ] Private UpdateTimeStamp // called continously to update the internal timestamp, maybe not neccesary as the timestamp can be updated ad-hoc+ [ ] GetEncodedBlob // returns the encoded blob to the customer
NOTE
-When this FB is finished we can take a look to separate it's design into a Core and an extension for the Simple part. That way we can expand without code duplication for the 'Advanced metrics' part++ When this FB is finished we can take a look to separate it's design into a Core and an extension for the Simple part. That way we can expand without code duplication for the 'Advanced metrics' part
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -4,33 +4,31 @@
The FB contains a protobuf blob encoder and various methods to quickly create (compose and/or encode) various messages.
Messages which are mandatory for this FB are:
- [ ] Node Death Message- [ ] Node Birth Message- [ ] Device Death Message- [ ] Device Birth Message+* [ ] Node Death Message+* [ ] Node Birth Message+* [ ] Device Death Message+* [ ] Device Birth Message
Since this FB is of the simple variant, it can can only deal with the SimpleObjects type.
Pass a single instance of SimpleObject to the Encoder.
- [ ] AddMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.- [ ] AddMetric( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder+* [ ] AddMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.+* [ ] AddMetric( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder
Apart from these methods it contains various interactions / diagnosis
- [ ] Diag // Diagnosis- [ ] Encode // Start Encoding- [ ] Encoded // Is encoding finished?- [ ] EncoderBusy // Is the encoder busy on a task?- [ ] EncoderError // An error occured- [ ] FlushPool // Removes all poolElements();+* [ ] Diag // Diagnosis+* [ ] Encode // Start Encoding+* [ ] Encoded // Is encoding finished?+* [ ] EncoderBusy // Is the encoder busy on a task?+* [ ] EncoderError // An error occured+* [ ] FlushPool // Removes all poolElements();
// Updates timestamp();
-// Initializes the PayloadEncoder- - [ ] GetBDSeqNum- [ ] getSeqNum- [ ] Private UpdateTimeStamp // called continously to update the internal timestamp, maybe not neccesary as the timestamp can be updated ad-hoc- [ ] GetEncodedBlob // returns the encoded blob to the customer+// Initializes the PayloadEncoder +* [ ] GetBDSeqNum+* [ ] getSeqNum+* [ ] Private UpdateTimeStamp // called continously to update the internal timestamp, maybe not neccesary as the timestamp can be updated ad-hoc+* [ ] GetEncodedBlob // returns the encoded blob to the customer
NOTE
-
When this FB is finished we can take a look to separate it's design into a Core and an extension for the Simple part. That way we can expand without code duplication for the 'Advanced metrics' part
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -21,9 +21,7 @@
* [ ] Encoded // Is encoding finished?
* [ ] EncoderBusy // Is the encoder busy on a task?
* [ ] EncoderError // An error occured
-* [ ] FlushPool // Removes all poolElements();-// Updates timestamp();-// Initializes the PayloadEncoder +* [ ] FlushPool //Removes all poolElements, Updates timestamp, Initializes the PayloadEncoder
* [ ] GetBDSeqNum
* [ ] getSeqNum
* [ ] Private UpdateTimeStamp // called continously to update the internal timestamp, maybe not neccesary as the timestamp can be updated ad-hoc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -4,6 +4,7 @@
The FB contains a protobuf blob encoder and various methods to quickly create (compose and/or encode) various messages.
Messages which are mandatory for this FB are:
+
* [ ] Node Death Message
* [ ] Node Birth Message
* [ ] Device Death Message
@@ -12,7 +13,9 @@
Since this FB is of the simple variant, it can can only deal with the SimpleObjects type.
Pass a single instance of SimpleObject to the Encoder.
+
* [ ] AddMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.
+*
* [ ] AddMetric( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder
Apart from these methods it contains various interactions / diagnosis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -15,10 +15,10 @@
Pass a single instance of SimpleObject to the Encoder.
* [ ] AddMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.
-*
* [ ] AddMetric( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder
Apart from these methods it contains various interactions / diagnosis
+
* [ ] Diag // Diagnosis
* [ ] Encode // Start Encoding
* [ ] Encoded // Is encoding finished?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -14,8 +14,8 @@
Pass a single instance of SimpleObject to the Encoder.
-* [ ] AddMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.-* [ ] AddMetric( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder+* [ ] AddSimpleMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.+* [ ] AddMetricList( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder
Apart from these methods it contains various interactions / diagnosis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -1,7 +1,7 @@
FB_SparkplugB_SimpleEncoder
This function block acts as a Helper to reduce work for FB_EoN.
-The FB contains a protobuf blob encoder and various methods to quickly create (compose and/or encode) various messages. +The FB contains a protobuf blob encoder and various methods to quickly create (compose and/or encode) various messages. Since this FB is of the 'simple' variant, it can can only deal with the SimpleObjects type.
Messages which are mandatory for this FB are:
@@ -10,14 +10,14 @@
* [ ] Device Death Message
* [ ] Device Birth Message
-Since this FB is of the simple variant, it can can only deal with the SimpleObjects type.-
Pass a single instance of SimpleObject to the Encoder.
* [ ] AddSimpleMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.
-* [ ] AddMetricList( Timestamp, ListOfSimpleObjects ) // Passes a prepared list of SimpleObjects to the encoder-Apart from these methods it contains various interactions / diagnosis+// Pass a prepared list of SimpleObjects to the Encoder.+* [ ] AddMetricList( Timestamp, ListOfSimpleObjects ) ++Apart from these methods it contains various interaction methods and diagnosis
* [ ] Diag // Diagnosis
* [ ] Encode // Start Encoding
@@ -28,8 +28,12 @@
* [ ] GetBDSeqNum
* [ ] getSeqNum
* [ ] Private UpdateTimeStamp // called continously to update the internal timestamp, maybe not neccesary as the timestamp can be updated ad-hoc
-* [ ] GetEncodedBlob // returns the encoded blob to the customer+Last but not least it should provide the end user with a way to obtain the protobuf encoded blob in order to publish it under the correct Sparkplug Topic+* [ ] GetEncodedBlobViaAdress( BlobAdr, BlobSize )+* [ ] GetEncodedBlobVia**-NOTE+** Any other ways to reurn the blob? **++NOTE 1
When this FB is finished we can take a look to separate it's design into a Core and an extension for the Simple part. That way we can expand without code duplication for the 'Advanced metrics' part
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -14,7 +14,8 @@
* [ ] AddSimpleMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.
-// Pass a prepared list of SimpleObjects to the Encoder.+Pass a prepared list of SimpleObjects to the Encoder.+
* [ ] AddMetricList( Timestamp, ListOfSimpleObjects )
Apart from these methods it contains various interaction methods and diagnosis
@@ -30,10 +31,11 @@
* [ ] Private UpdateTimeStamp // called continously to update the internal timestamp, maybe not neccesary as the timestamp can be updated ad-hoc
Last but not least it should provide the end user with a way to obtain the protobuf encoded blob in order to publish it under the correct Sparkplug Topic
+
* [ ] GetEncodedBlobViaAdress( BlobAdr, BlobSize )
* [ ] GetEncodedBlobVia**
-** Any other ways to reurn the blob? **+** Think of simple ways to return the blob **
NOTE 1
When this FB is finished we can take a look to separate it's design into a Core and an extension for the Simple part. That way we can expand without code duplication for the 'Advanced metrics' part
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -20,15 +20,15 @@
Apart from these methods it contains various interaction methods and diagnosis
-* [ ] Diag // Diagnosis-* [ ] Encode // Start Encoding-* [ ] Encoded // Is encoding finished?-* [ ] EncoderBusy // Is the encoder busy on a task?-* [ ] EncoderError // An error occured+* [x] Diag // Diagnosis+* [x] Encode // Start Encoding+* [x] Encoded // Is encoding finished?+* [x] EncoderBusy // Is the encoder busy?+* [x] EncoderError // An error occured
* [ ] FlushPool //Removes all poolElements, Updates timestamp, Initializes the PayloadEncoder
-* [ ] GetBDSeqNum-* [ ] getSeqNum-* [ ] Private UpdateTimeStamp // called continously to update the internal timestamp, maybe not neccesary as the timestamp can be updated ad-hoc+* [x] GetBDSeqNum+* [x] getSeqNum+
Last but not least it should provide the end user with a way to obtain the protobuf encoded blob in order to publish it under the correct Sparkplug Topic
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -16,7 +16,7 @@
Pass a prepared list of SimpleObjects to the Encoder.
-* [ ] AddMetricList( Timestamp, ListOfSimpleObjects ) +* [x] AddMetricList( Timestamp, ListOfSimpleObjects )
Apart from these methods it contains various interaction methods and diagnosis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -25,10 +25,9 @@
* [x] Encoded // Is encoding finished?
* [x] EncoderBusy // Is the encoder busy?
* [x] EncoderError // An error occured
-* [ ] FlushPool //Removes all poolElements, Updates timestamp, Initializes the PayloadEncoder +* [ ] InitEncoderBeforeAddingMetrics( Timestamp, SeqNr) // Initialize the Encoder before adding Metrics
* [x] GetBDSeqNum
-* [x] getSeqNum-+* [x] GetSeqNum
Last but not least it should provide the end user with a way to obtain the protobuf encoded blob in order to publish it under the correct Sparkplug Topic
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -5,10 +5,12 @@
Messages which are mandatory for this FB are:
-* [ ] Node Death Message-* [ ] Node Birth Message-* [ ] Device Death Message-* [ ] Device Birth Message+* [x] Node Death Certificate+* [x] Node Birth Certificate+* [x] Node Data +* [x] Device Death Certificate+* [x] Device Birth Certificate+* [x] Device Data
Pass a single instance of SimpleObject to the Encoder.
@@ -31,7 +33,7 @@
Last but not least it should provide the end user with a way to obtain the protobuf encoded blob in order to publish it under the correct Sparkplug Topic
-* [ ] GetEncodedBlobViaAdress( BlobAdr, BlobSize )+* [x] GetEncodedBlobViaAdress( BlobAdr, BlobSize )
* [ ] GetEncodedBlobVia**
** Think of simple ways to return the blob **
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GetEoNNBirthCertificate Line 4:
Here you give the FB_Payload a seq of zero, but you should either:
* reset the _seqNum to zero, then call GetSeqNum()
* reset the _seqNum to one, and leave the call as is.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -33,10 +33,8 @@Last but not least it should provide the end user with a way to obtain the protobuf encoded blob in order to publish it under the correct Sparkplug Topic
-* [x] GetEncodedBlobViaAdress( BlobAdr, BlobSize )-* [ ] GetEncodedBlobVia**+* [x] GetEncodedBlob( BlobAdr, BlobSize )-** Think of simple ways to return the blob **NOTE 1
When this FB is finished we can take a look to separate it's design into a Core and an extension for the Simple part. That way we can expand without code duplication for the 'Advanced metrics' part
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -14,11 +14,34 @@Pass a single instance of SimpleObject to the Encoder.
-* [x] AddSimpleMetric( Timestamp, SimpleObject ) // It is not mandatory for the SimpleObject to be part of a list.+* [ ] AddSimpleMetric( Timestamp, SimpleObject ) (1)++ Note 1+ This method accepts a single SimpleObject deliberatly, to keep burnerplate code low and added flexibility as it is not mandatory for a SimpleObject to be part of an array or a list.+ Pass a prepared list of SimpleObjects to the Encoder.
-* [x] AddMetricList( Timestamp, ListOfSimpleObjects ) +* [ ] AddMetricList( Timestamp, ListOfSimpleObjects ) (2)++ Note 2+ This method accepts a List of SimpleObject, this way you can send multiple values in one list. This list can not contain other metrics metrics than those announced on birth.+ The list is thus at most the same list as "ListOfMetricsWhichWillEverReportedOn" +++Pass a list of every All Metrics Which Will Ever Reported on during this "Lifetime" (3)++* [ ] AddlistOfMetricsWhichWillEverReportedOn( ListOfMetricsWhichWillEverReportedOn )+ + Note 3+ This Method can be used to pass the entire list of metrics which will ever be reported on and send this list ONLY on node / device (re)birth. We can only send values which have been 'announced at birth' of the Node or Device. Since the Device or Node can die and be reborn, elements could be added or removed from the list which will be announced on the next Birth.+ + Warning!+ Never send values that have not been announced on Birth!+ + Idea+ Add a way to let a Node/Device die and be reborn in order to anounce the latest list so we can update 'on-the-fly'+ Apart from these methods it contains various interaction methods and diagnosis
@@ -34,7 +57,3 @@Last but not least it should provide the end user with a way to obtain the protobuf encoded blob in order to publish it under the correct Sparkplug Topic
* [x] GetEncodedBlob( BlobAdr, BlobSize )
---NOTE 1- When this FB is finished we can take a look to separate it's design into a Core and an extension for the Simple part. That way we can expand without code duplication for the 'Advanced metrics' part
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -17,7 +17,9 @@* [ ] AddSimpleMetric( Timestamp, SimpleObject ) (1)
Note 1
- This method accepts a single SimpleObject deliberatly, to keep burnerplate code low and added flexibility as it is not mandatory for a SimpleObject to be part of an array or a list.+ This method accepts a single SimpleObject deliberatly, to keep burnerplate code low+ and added flexibility as it is not mandatory for a SimpleObject to be part of an + array or a list.Pass a prepared list of SimpleObjects to the Encoder.
@@ -25,8 +27,10 @@* [ ] AddMetricList( Timestamp, ListOfSimpleObjects ) (2)
Note 2
- This method accepts a List of SimpleObject, this way you can send multiple values in one list. This list can not contain other metrics metrics than those announced on birth.- The list is thus at most the same list as "ListOfMetricsWhichWillEverReportedOn" + This method accepts a List of SimpleObject, this way you can send multiple values+ in one list. This list can not contain other metrics metrics than those announced+ on birth. The list is thus at most the same list as+ "ListOfMetricsWhichWillEverReportedOn".Pass a list of every All Metrics Which Will Ever Reported on during this "Lifetime" (3)
@@ -34,13 +38,18 @@* [ ] AddlistOfMetricsWhichWillEverReportedOn( ListOfMetricsWhichWillEverReportedOn )
Note 3
- This Method can be used to pass the entire list of metrics which will ever be reported on and send this list ONLY on node / device (re)birth. We can only send values which have been 'announced at birth' of the Node or Device. Since the Device or Node can die and be reborn, elements could be added or removed from the list which will be announced on the next Birth.+ This Method can be used to pass the entire list of metrics which will ever be+ reported on and send this list ONLY on node / device (re)birth. We can only send+ values which have been 'announced at birth' of the Node or Device. Since the+ Device or Node can die and be reborn, elements could be added or removed from the+ list which will be announced on the next Birth. Warning!
Never send values that have not been announced on Birth!
Idea
- Add a way to let a Node/Device die and be reborn in order to anounce the latest list so we can update 'on-the-fly'+ Add a way to let a Node/Device die and be reborn in order to anounce the latest+ list so we can update 'on-the-fly'Apart from these methods it contains various interaction methods and diagnosis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -5,56 +5,55 @@
Messages which are mandatory for this FB are:
-* [x] Node Death Certificate-* [x] Node Birth Certificate-* [x] Node Data -* [x] Device Death Certificate-* [x] Device Birth Certificate-* [x] Device Data+* [ ] Node Death Certificate+* [ ] Node Birth Certificate+* [ ] Node Data +* [ ] Device Death Certificate+* [ ] Device Birth Certificate+* [ ] Device Data-Pass a single instance of SimpleObject to the Encoder.--* [ ] AddSimpleMetric( Timestamp, SimpleObject ) (1)-- Note 1- This method accepts a single SimpleObject deliberatly, to keep burnerplate code low- and added flexibility as it is not mandatory for a SimpleObject to be part of an - array or a list.- --Pass a prepared list of SimpleObjects to the Encoder.--* [ ] AddMetricList( Timestamp, ListOfSimpleObjects ) (2)-- Note 2- This method accepts a List of SimpleObject, this way you can send multiple values- in one list. This list can not contain other metrics metrics than those announced- on birth. The list is thus at most the same list as- "ListOfMetricsWhichWillEverReportedOn".---Pass a list of every All Metrics Which Will Ever Reported on during this "Lifetime" (3)+Pass a list of every All Metrics Which Will Ever Reported on during this "Lifetime". (1)
* [ ] AddlistOfMetricsWhichWillEverReportedOn( ListOfMetricsWhichWillEverReportedOn )
- Note 3+ Note 1
This Method can be used to pass the entire list of metrics which will ever be
reported on and send this list ONLY on node / device (re)birth. We can only send
- values which have been 'announced at birth' of the Node or Device. Since the+ values which have been 'announced at birth' of the Node or Device. Since the
Device or Node can die and be reborn, elements could be added or removed from the
- list which will be announced on the next Birth.+ list which will be announced only at the next Birth.
Warning!
- Never send values that have not been announced on Birth!+ Never send values that have not been announced this Birth!
Idea
Add a way to let a Node/Device die and be reborn in order to anounce the latest
list so we can update 'on-the-fly'
+++Pass a single instance of SimpleObject to the Encoder. (2)++* [ ] AddSimpleMetric( Timestamp, SimpleObject ) ++ Note 2+ This method accepts a single SimpleObject deliberatly, to keep burnerplate code low+ and added flexibility as it is not mandatory for a SimpleObject to be part of an + array or a list. The SimpleObject must have been announced at this Birth.+ ++Pass a prepared list of SimpleObjects to the Encoder. (3)++* [ ] AddMetricList( Timestamp, ListOfSimpleObjects ) ++ Note 3+ This method accepts a List of SimpleObject, this way you can send multiple values+ in one list. This list can not contain other metrics metrics than those announced+ on birth. The list is thus at most the same list as "ListOfMetricsWhichWillEverReportedOn".-Apart from these methods it contains various interaction methods and diagnosis+Apart from these Methods the FB contains various methods for interaction and diagnosis -* [x] Diag // Diagnosis+* [x] Diag // Diagnosis of the internal decoder state
* [x] Encode( Enable ) // Start Encoding if Enable = TRUE, Stops encoding if enable = FALSE
* [x] Encoded // Is encoding finished?
* [x] EncodeBusy // Is the encoder busy?
@@ -63,6 +62,6 @@
* [x] GetBDSeqNum
* [x] GetSeqNum
-Last but not least it should provide the end user with a way to obtain the protobuf encoded blob in order to publish it under the correct Sparkplug Topic+Last but not least it should provide the end user with a way to obtain the protobuf encoded (serialized) blob in order to publish it under the correct SparkPlugB Topic
* [x] GetEncodedBlob( BlobAdr, BlobSize )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old+++ new@@ -14,7 +14,7 @@
Pass a list of every All Metrics Which Will Ever Reported on during this "Lifetime". (1)
-* [ ] AddlistOfMetricsWhichWillEverReportedOn( ListOfMetricsWhichWillEverReportedOn )+* [ ] UpdateListOfMetricsWhichWillEverReportedOn( ListOfMetricsWhichWillEverReportedOn )
Note 1
This Method can be used to pass the entire list of metrics which will ever be
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
Diff:
GetEoNNBirthCertificate Line 4:
Here you give the FB_Payload a seq of zero, but you should either:
* reset the
_seqNumto zero, then call GetSeqNum()* reset the
_seqNumto one, and leave the call as is.Diff:
Good Catch!
I plugged this hole.
Diff:
Diff:
Diff:
Diff:
Diff: