<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Ticket search results</title><link>https://forge.codesys.com/lib/cobolt/tickets/</link><description>You searched for assigned_to:"aliazzz"</description><language>en</language><lastBuildDate>Sun, 18 Oct 2020 19:43:12 -0000</lastBuildDate><item><title>EoN: repeatedly publising NDATA or missing NDATA</title><link>https://forge.codesys.com/lib/cobolt/tickets/64/</link><description>If you only call PublishNDATA once, then an NDATA is not sent.
If you call PublishNDATA repeatedly though, it continuously sends NDATA.
A balance should be found, such that each change is sent only once.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Sat, 03 Oct 2020 22:28:07 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/64/</guid></item><item><title>EoN: NDATA puts elements into a second list</title><link>https://forge.codesys.com/lib/cobolt/tickets/63/</link><description>NDATA uses another list, ChangeList, in addition to the AllMetricsList.
The problem is, these elements can only belong to one list.
Solution:

Rather than how it currently is:
1. Cycle through Every Element
2. Add changed element to ChangeList (side effect: removing element from AllMetricsList)
3. Call the AddListOfMetrics, which cycles through every changed element and adds them to the Encoder

Should do:
1. Cycle through Every Element
2. Add changed element to Encoder</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Sat, 03 Oct 2020 17:57:07 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/63/</guid></item><item><title>EoN: Maximum size NDEATH</title><link>https://forge.codesys.com/lib/cobolt/tickets/61/</link><description>In the code, it asks "What is the maximum size of an NDEATH"
Answer: 44 Bytes. (see attachment)
Note that changing the size to exactly 44 requires the fix in ticket [#60].
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Sat, 03 Oct 2020 22:28:28 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/61/</guid></item><item><title>Edge_node_id and group_id elements may not contain /, #, + characters</title><link>https://forge.codesys.com/lib/cobolt/tickets/56/</link><description>Update code to check/replace these illegal characters "/,+,#" from the Edge_Node _Id or Group_id element

The illegal characters will be replaced with an underscore "_" </description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Wed, 30 Sep 2020 16:34:44 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/56/</guid></item><item><title>How do we Implement #PublishInterval / PublishRate?</title><link>https://forge.codesys.com/lib/cobolt/tickets/55/</link><description># Publish interval Definition
PublishInterval / PublishRate is default set to 5000 ms.
So we cannot publish "updates" any faster then each 5s.

This means the publish rate is a kind of "sample-rate" per signal change:

* 5000 means 1 signal change per interval of 5 seconds is sent,
* 100 means 1 signal change per interval of 100mec is sent,
* 10000 means 1 signal change per interval of 10 seconds is sent.

# Solution
We have a pulse timer (or some other means to detect a time interval), it sets itself as soon as we have sent data and after T#PublishInterval it resets itself. If new data is detected during timer countdown we ignore it. If the timer has expired we can send data immediately and the timer sets itself again after this action. So, the timer "blocks" sending of data during countdown.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Wed, 30 Sep 2020 16:35:09 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/55/</guid></item><item><title>FB_EoN: PublishNodeData topic error</title><link>https://forge.codesys.com/lib/cobolt/tickets/54/</link><description>similar to [#53]
PublishNodeData() roughly line 17 through 19
NDATATopic := WCONCAT( SPARKPLUGB, GroupId);
NDATATopic := WCONCAT( **_LastWillTopic**, NODE_DATA_TOPIC);
NDATATopic := WCONCAT( **_LastWillTopic**, NodeName);
Should be all NDATATopic</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/54/</guid></item><item><title>FB_EoN: PublishNodeBirth</title><link>https://forge.codesys.com/lib/cobolt/tickets/53/</link><description>copy paste edit error around FB_Edge_Of_Network_Node.PublishNodeBirth line 22-24.
**NBIRTHTopic**   := WCONCAT( SPARKPLUGB, GroupId);
NBIRTHTopic   := WCONCAT( **_LastWillTopic**, NODE_BIRTH_TOPIC);
NBIRTHTopic   := WCONCAT( **_LastWillTopic**, FW_SLASH);
NBIRTHTopic   := WCONCAT( **_LastWillTopic**, NodeName);
_LastWillTopic should be NBIRTHTopic

Additionally, as NODE_BIRTH_TOPIC := "/NBIRTH/" you don't need the line with FW_SLASH (otherwise it becomes spBv1.0/NBIRTH//myNodeName</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/53/</guid></item><item><title>FB_MQTT: PublishMessageSize is falsely calculated around line 32</title><link>https://forge.codesys.com/lib/cobolt/tickets/52/</link><description>Similar to [#50], but this time around line 30-32 of FB_MQTT().
_PublishMessageSize := DINT_TO_UDINT(2*Stu.StrLenW( ADR(_PublishMessage)));

Should be deleted.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/52/</guid></item><item><title>EoN: EON.PublishBirth() calls publish() twice</title><link>https://forge.codesys.com/lib/cobolt/tickets/51/</link><description>EON.PublishBirth() calls _MQTT.publish() twice.
publish() only sets the inputs to _Publisher, it is not until _MQTT() is called that the message is published with a call to _Publisher().

Either have some sort of state machine to 
1. Connect
2. Publish NBirth
3. Publish DBirth

Or have two publishers (and two blobs, etc)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/51/</guid></item><item><title>FB_MQTT: false calculation of _LastwillMessageSize</title><link>https://forge.codesys.com/lib/cobolt/tickets/50/</link><description>FB_MQTT Line 2 is _LastWillMessageSize := DINT_TO_UINT(2*Stu.StrLenW(ADR(_LastWillMessage)));
This doesn't make sense.  _LastWillMessageSize is already set in FB_MQTT.SetLastWill, so you don't need to set it again to twice the length of some random series of bytes before you hit a dword 0x0000 (Pointer to Pointer to a Byte Array which isn't a wstring).

I think line 2 has to go! (also line 1)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/50/</guid></item><item><title>EoN: FB_Edge_Of_Network_Node.ServerURL is not used</title><link>https://forge.codesys.com/lib/cobolt/tickets/49/</link><description>FB_Edge_Of_Network_Node.ServerURL is not used, so the user cannot connect to a broker of their choice.
Ideally this would be passed to _MQTT before connect</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/49/</guid></item><item><title>FB_SimplePayloadEncoder: all unit tests all return a 37KB payload, even the small ones</title><link>https://forge.codesys.com/lib/cobolt/tickets/45/</link><description>It seems that all unit tests are returning the result of the biggest unit test.
==&gt; SHOULD: Each returns a different payload.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Sun, 27 Sep 2020 16:33:39 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/45/</guid></item><item><title>Add SparkplugB.T_DateTime ALIAS for ULINT</title><link>https://forge.codesys.com/lib/cobolt/tickets/41/</link><description>I gather the description says it all!
Add a SparkplugB.T_DateTime ALIAS TYPE for ULINT

Usage:

    TimeStampOld : ULINT;
    TimeStampNew : SparkplugB.T_DateTime; // Still an ULINT ;-)
    </description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Sat, 03 Oct 2020 21:17:15 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/41/</guid></item><item><title>FB_SparkplugB_SimpleEncoder</title><link>https://forge.codesys.com/lib/cobolt/tickets/39/</link><description>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. 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:

* [x] Node Death Certificate
* [x] Node Birth Certificate
* [x] Node Data 
* [x] Device Death Certificate
* [x] Device Birth Certificate
* [x] Device Data

Pass a list of every All Metrics Which Will Ever Reported on during this "Lifetime". (1)

* [x] UpdateListOfMetricsWhichWillEverReportedOn( ListOfMetricsWhichWillEverReportedOn )
    
        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
        Device or Node can die and be reborn, elements could be added or removed from the
        list which will be announced only at the next Birth.
        
        Warning!
        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)

* [x] 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)

* [x] 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 the FB contains various methods for interaction and 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?
* [x] EncodeError( =&gt; eError ) // An error occured
* [x] InitEncoderBeforeAddingMetrics( Timestamp, SeqNr) // Initialize the Encoder before adding Metrics
* [x] GetBDSeqNum
* [x] GetSeqNum

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 )</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Sat, 03 Oct 2020 23:45:17 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/39/</guid></item><item><title>FB_MQTTPUBSUB : Before sending a payload, ensure that MQTT.MQTTParam.g_udiMaxPayloadSize and g_udiMaxPacketSize are appropriately set</title><link>https://forge.codesys.com/lib/cobolt/tickets/37/</link><description>As MQTT.MQTTParam.g_udiMaxPayloadSize and MQTT.MQTTParam.g_udiMaxPacketSize are library parameters, the end user has to set these, we cannot change them using the library.  However, we can raise errors if we try to send something too big.
To investigate: what happens when a packet or payload is received which is too big?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Sun, 18 Oct 2020 11:17:31 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/37/</guid></item><item><title>50% of FB/Function will need a Unit Test</title><link>https://forge.codesys.com/lib/cobolt/tickets/33/</link><description>Unit test will be written to cover 50% of the FB's and methods from the library using Cfunit v1.1.0.0 or better.
The unittest project in the trunk is to be leading. Any other tests can be written in branches to test personal developments.
As the trunk of the library gets updated, ideally the unittest project of the trunk gets updated too.

The software will be unit tested and/or integration tested, as much as possible.

**My suggestion is that we all take a peek at the unit test code whenever we feel like it to ensure that it passes a basic sanity level**



</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Sun, 18 Oct 2020 19:43:12 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/33/</guid></item><item><title>FB_MQTT_PubSub Considerations</title><link>https://forge.codesys.com/lib/cobolt/tickets/32/</link><description>PubSub can inform us that a message has been received via .MessageReceived().
The message &amp; topic then can be obtained via .getmessage().

Example
~~~
IF PubSub.MessageReceived() THEN
        myRecvMessage := PubSub.MyMessage( wsTopic =&gt; MyTopic);
        
        // pass the message to the payload decoder
        MyDecodedMessage := Payload.Decode( pBuf:=ADR(myRecvMessage),udiBufSize:=SIZEOF(myRecvMessage));
END_IF;
~~~

=&gt; Passing a pointer/length of the blob (the undecoded received message) is far superior in speed and resources as no data is physically copied around. Binding a dynamic buffer is under future consideration.

=&gt; Interaction/handshaking between PubSub and Payload in the usual way (xbusy, xdone, xerror) and methods for this are provided. 

=&gt; according to the documentation of the CODESYTS IIoT lib, there is a maximum message payload length.

In the CODESYS IIot MQTT library, is a single subscriber only capable of just subscribing to a single topic?
=&gt; I Assume so, as the provided example shows a single topic per subscriber instance.

</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/32/</guid></item><item><title>FB_MQTT_PubSub</title><link>https://forge.codesys.com/lib/cobolt/tickets/24/</link><description>~~~
FB_MQTT_PubSub
    /Client
		ClientBusy(Private)
		ClientDone(Private)
		ClientError()
		Connect()
		Disconnect()
		InitialiseClient(Private)
		IsConnected()
		IsConnecting()
		SetBroker()
		SetLastWill()
		SetSessionCredentials()
		SetSessionTls()
		GetConnectionState()
    /Publisher
		Publish()
		PublisherBusy()
		PublisherDone()
		PublisherError()
	/Subscriber	
        SetSubscriberBuffer =&gt; // !needs implementation!
        IsMessageReceived() // TRUE if a message is ready to be digested
        GetMessage() // Provides the message itself =&gt; DEBUG! provides NOTHING currently :-(
		Subscribe()
		SubscriberBusy()
		SubscriberDone()
		SubscriberError()
		Unsubscribe()
~~~

*The behaviourmodel is phased out as it is overkill because each of the composite FB's allready implemented their own CMBL.IConc statemachine*
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/24/</guid></item><item><title>Architecture</title><link>https://forge.codesys.com/lib/cobolt/tickets/23/</link><description>FB_EoN_Node // Represents a Sparkplug Edge of Network Node and is responsible for publishing Node and 
// Device metrics (thus integration without separate devices is possible)

encapsulates

FB_MQTT_PubSub // MQTT Client &amp; Publisher
FB_Payload // Responsible for payload blob encoding and decoding
FB_Sparkplug // Responsible for the Sparkplug B Topics &amp; Messages

Optional
FB_Device // Represents a single Sparkplug Device. Responsible for publishing Device Metrics
// In theory the amount of devices is unlimited and is only limited by the adress namespace and maximum message // length. We will limit the number of devices default to 32 (configurable via a library parameter)
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Sat, 03 Oct 2020 23:46:45 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/23/</guid></item><item><title>SVN: use 'standard' cforge folder structure</title><link>https://forge.codesys.com/lib/cobolt/tickets/18/</link><description>The cforge svn guidelines are in the logical location: https://forge.codesys.com/forge/wiki/Migrating%20Projects/
so folder structure should be:

    license.txt
    STRUCTURE.MD
    .drone.yml
    branches/
    tags/
    trunk/
        mqttsparkplugb.package           &lt;== created with cforge &gt; build???
        mqttsparkplugb/
            package.manifest               &lt;== create with cforge &gt; create package
            mqttsparkplugb/                &lt;== Library (created with CODESYS SVN)
            unittest/                      &lt;== project with cf unit unittests (created with CODESYS SVN)
            mqttsparkplugb-example/        &lt;== project (created with CODESYS SVN)
            mqttsparkplugb.library         &lt;== created with cforge &gt; comit??
            unittest.project               &lt;== created with cforge &gt; comit??
            mqttsparkplugb-example.project &lt;== created with cforge &gt; comit??
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:06 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/18/</guid></item><item><title>moved trunk to trunk/library</title><link>https://forge.codesys.com/lib/cobolt/tickets/17/</link><description>I haved moved the trunk ./ to trunk/library ./</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Sun, 29 Mar 2020 19:52:04 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/17/</guid></item><item><title>Initial Testing MQTT Broker</title><link>https://forge.codesys.com/lib/cobolt/tickets/9/</link><description>Requirement: quick to setup, access to all initial developers

Solution:
Host: broker.hivemq.com
TCP Port: 1883
No authentication or certificate verification possible

See http://www.mqtt-dashboard.com/ 
for their current traffic.

For a good MQTT explorer;
http://www.jensd.de/apps/mqttfx/1.7.0/mqttfx-1.7.0-windows-x64.exe
or (slightly more experimental)

http://mqtt-explorer.com/ 
Opensource, free and available for any OS by Thomas Nordquist

</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Sun, 29 Mar 2020 19:52:04 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/9/</guid></item><item><title>Update Git to https://github.com/eclipse/tahu</title><link>https://forge.codesys.com/lib/cobolt/tickets/7/</link><description>[Git] seems to point to an old version of repository, with an old version (v2.1) of the SparkPlug B spec.  Suggest we upgrade to https://github.com/eclipse/tahu
Comparing the spec though, it is just changing the owner from CirrusLink to eclipse.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Mon, 14 Sep 2020 07:37:59 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/7/</guid></item><item><title>FB_EoN_Node</title><link>https://forge.codesys.com/lib/cobolt/tickets/5/</link><description>This FB should form the basis for every Sparkplug B Node.

There can be several Sparkplug B Nodes in a network. 
Every Sparkplug B Node can have any number of devices (0..N), but the Node itself is singular.
It bridges between the MQTT Broker and device(s), sensor(s) and IO(s)

An implementation can be made after the IEC "Google Protobufs' ticket has been Addressed.
Suggestions for a lean and mean but proper readable implementation are welcome.
I'd suggest we try to follow/translate a library example provided by SparkplugB.

~~~
FB_EoN_Node
    FB_Init()
    Initialise()
    onConnect()
    onMessage()
    publishBirth()
    publishDeviceBirth()
    publishNodeBirth()
    SessionState()
~~~</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Sat, 03 Oct 2020 23:43:38 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/5/</guid></item><item><title>Create session state management for EoN Node</title><link>https://forge.codesys.com/lib/cobolt/tickets/4/</link><description>The Eon device interacts with the MQTT server in a session.
The session state management is well described in the techref. PDF.

This session state management can be implemented via a state machine.
Or if the state machine is 'simple' we can choose to implement is via simple binary logic.
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Mon, 14 Sep 2020 07:27:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/tickets/4/</guid></item></channel></rss>