[4e24b4]: / project / sparkplug™_mqtt_host_b9741afd / function_blocks_8ad6e219 / fb_primaryhost_ec6863e3 / fb_primaryhostmessageconsumer_0bdfb382 / 0bdfb382e83f44ce8b28d26c6658b28d.object  Maximize  Restore  History

Download this file

1 lines (1 with data), 37.6 kB

1
{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)0bdfb382-e83f-44ce-8b28-d26c6658b28d","ParentGuid":"(Guid)00000000-0000-0000-0000-000000000000","Name":"(string)FB_PrimaryHostMessageConsumer","Properties":{"@Type":"2c41fa04:IDictionary","@Value":[{"@Key":"(Guid)829a18f2-c514-4f6e-9634-1df173429203","@Value":{"@Type":"829a18f2","@Value":{"ParentObjects":{"@Type":"fa2ee218:IDictionary","@Value":[{"@Key":"(Guid)21af5390-2942-461a-bf89-951aaf6999f1","@Value":"(Guid)ec6863e3-35a1-4237-b54f-4c4d98ebfb4e"}]}}}}]},"TypeGuid":"(Guid)6f9dac99-8de1-4efc-8465-68ac443b7d08","EmbeddedTypeGuids":{"@Type":"[Guid]","@Value":["(Guid)a9ed5b7e-75c5-4651-af16-d2c27e98cb94","(Guid)3b83b776-fb25-43b8-99f2-3c507c9143fc"]}}},"TypeInfos":{"2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","829a18f2":"{829a18f2-c514-4f6e-9634-1df173429203}","fa2ee218":"{fa2ee218-a39b-4b6d-b249-49dbddbd168a}","Guid":"System.Guid","string":"System.String"}},"object":{"Graph":{"@Type":"6f9dac99","@Value":{"SpecialFunc":{"@Type":"0db3d7bb:Enum","@Value":"None"},"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)408","Tag":null,"Text":"(string)_RecvMesg REF= pMQTT^.GetSubscriberMessage( MessageTopic => _RecvTopic );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)409","Tag":null,"Text":"(string)_TopicParser( pTopic := ADR( _RecvTopic ) ); //parses the topic"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)846","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)845","Tag":null,"Text":"(string)// log the topic in debug level"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)838","Tag":null,"Text":"(string)WriteHostLog( CmpLog.LogClass.LOG_DEBUG, 'Incoming message in topic: %s', TO_STRING( _RecvTopic ) );   "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)847","Tag":null,"Text":"(string)       "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)410","Tag":null,"Text":"(string)CASE _TopicParser.MessageType OF //SparkplugMessageTypes"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)411","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)841","Tag":null,"Text":"(string)    SPStack.SparkplugMessageTypes.NBIRTH: //Birth certificate for MQTT EoN nodes."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)854","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)412","Tag":null,"Text":"(string)        _MyEdge REF= pPrimaryHost^.GetEdge( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)413","Tag":null,"Text":"(string)                                             EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)414","Tag":null,"Text":"(string)                                             eError => _HandledError );                                           "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)416","Tag":null,"Text":"(string)        CASE _HandledError OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)910","Tag":null,"Text":"(string)            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)417","Tag":null,"Text":"(string)            SPStack.ERROR.GroupIDNotFound: // ==> DETECTED NEW GROUP!"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)912","Tag":null,"Text":"(string)            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)418","Tag":null,"Text":"(string)                _MyGroupId REF= pPrimaryHost^.allocGroupId( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)419","Tag":null,"Text":"(string)                                                             eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)848","Tag":null,"Text":"(string)                //log new groupid"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)849","Tag":null,"Text":"(string)                WriteHostLog( CmpLog.LogClass.LOG_INFO, 'Host registered new GroupID: %s', TO_STRING( _TopicParser.GroupId ) );                                                                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)420","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)421","Tag":null,"Text":"(string)                IF eError = SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)422","Tag":null,"Text":"(string)                    _MyEdge REF= pPrimaryHost^.allocEdgetoGroupId( EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)423","Tag":null,"Text":"(string)                                                                    itfGroupID := _MyGroupId.itfGroupID,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)424","Tag":null,"Text":"(string)                                                                    eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)855","Tag":null,"Text":"(string)                    // Log new remote edge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)853","Tag":null,"Text":"(string)                    WriteHostLog( CmpLog.LogClass.LOG_INFO, 'Host registered Remote Edge: %s', TO_STRING( _TopicParser.EdgeId ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)425","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)426","Tag":null,"Text":"(string)                    IF eError = SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)427","Tag":null,"Text":"(string)                        _MyEdge.ProcessNBIRTH( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)428","Tag":null,"Text":"(string)                                               pMessage := _RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)429","Tag":null,"Text":"(string)                                               xError => xError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)430","Tag":null,"Text":"(string)                                               eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)431","Tag":null,"Text":"(string)                    ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)432","Tag":null,"Text":"(string)                        xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)433","Tag":null,"Text":"(string)                        //eError := eError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)434","Tag":null,"Text":"(string)                    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)435","Tag":null,"Text":"(string)                ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)436","Tag":null,"Text":"(string)                    xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)437","Tag":null,"Text":"(string)                    //eError := eError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)438","Tag":null,"Text":"(string)                END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)904","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)905","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)439","Tag":null,"Text":"(string)            SPStack.ERROR.EdgeIDNotFound: // ==> DETECTED NEW EDGE!"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)906","Tag":null,"Text":"(string)            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)440","Tag":null,"Text":"(string)                _MyGroupId REF= pPrimaryHost^.GetGroupID( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)441","Tag":null,"Text":"(string)                                                          eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)856","Tag":null,"Text":"(string)                                                          "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)859","Tag":null,"Text":"(string)                //log new groupid"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)857","Tag":null,"Text":"(string)                WriteHostLog( CmpLog.LogClass.LOG_INFO, 'Host registered new GroupID: %s', TO_STRING( _TopicParser.GroupId ) );                                                           "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)442","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)443","Tag":null,"Text":"(string)                IF eError = SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)444","Tag":null,"Text":"(string)                    _MyEdge REF= pPrimaryHost^.allocEdgetoGroupId( EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)445","Tag":null,"Text":"(string)                                                                    itfGroupID := _MyGroupId.itfGroupID,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)446","Tag":null,"Text":"(string)                                                                    eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)862","Tag":null,"Text":"(string)                    // Log new remote edge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)861","Tag":null,"Text":"(string)                    WriteHostLog( CmpLog.LogClass.LOG_INFO, 'Host registered Remote Edge: %s', TO_STRING( _TopicParser.EdgeId ) );                                                                    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)447","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)448","Tag":null,"Text":"(string)                    IF eError = SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)449","Tag":null,"Text":"(string)                        _MyEdge.ProcessNBIRTH( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)450","Tag":null,"Text":"(string)                                               pMessage := _RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)451","Tag":null,"Text":"(string)                                               xError => xError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)452","Tag":null,"Text":"(string)                                               eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)453","Tag":null,"Text":"(string)                    ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)454","Tag":null,"Text":"(string)                        xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)455","Tag":null,"Text":"(string)                        //eError := eError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)456","Tag":null,"Text":"(string)                    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)457","Tag":null,"Text":"(string)                ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)458","Tag":null,"Text":"(string)                    xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)459","Tag":null,"Text":"(string)                    //eError := eError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)460","Tag":null,"Text":"(string)                END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)907","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)908","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)461","Tag":null,"Text":"(string)            SPStack.ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)909","Tag":null,"Text":"(string)            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)462","Tag":null,"Text":"(string)                _MyEdge.ProcessNBIRTH( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)463","Tag":null,"Text":"(string)                                       pMessage := _RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)464","Tag":null,"Text":"(string)                                       xError => xError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)465","Tag":null,"Text":"(string)                                       eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)466","Tag":null,"Text":"(string)        ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)467","Tag":null,"Text":"(string)            ; //{info 'TODO: maybe some sort of error??'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)468","Tag":null,"Text":"(string)        END_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)865","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)903","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)469","Tag":null,"Text":"(string)    SPStack.SparkplugMessageTypes.NDATA: //Node data message."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)866","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)470","Tag":null,"Text":"(string)        _MyEdge REF= pPrimaryHost^.GetEdge( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)471","Tag":null,"Text":"(string)                                             EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)472","Tag":null,"Text":"(string)                                             eError => _HandledError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)473","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)474","Tag":null,"Text":"(string)        CASE _HandledError OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)475","Tag":null,"Text":"(string)            SPStack.ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)476","Tag":null,"Text":"(string)                _MyEdge.ProcessNDATA( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)477","Tag":null,"Text":"(string)                                      pMessage := _RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)478","Tag":null,"Text":"(string)                                      xError => xError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)479","Tag":null,"Text":"(string)                                      eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)864","Tag":null,"Text":"(string)                                      "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)480","Tag":null,"Text":"(string)        ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)481","Tag":null,"Text":"(string)            xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)482","Tag":null,"Text":"(string)            eError := SPStack.Error.EdgeIDNotFound;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)483","Tag":null,"Text":"(string)            WriteHostLog( CmpLog.LogClass.LOG_WARNING,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)485","Tag":null,"Text":"(string)                            'PrimaryHost process NDATA metric error: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)486","Tag":null,"Text":"(string)                            TO_STRING( _HandledError ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)863","Tag":null,"Text":"(string)                            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)487","Tag":null,"Text":"(string)        END_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)867","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)902","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)488","Tag":null,"Text":"(string)    SPStack.SparkplugMessageTypes.NDEATH: //Death certificate for MQTT EoN nodes."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)868","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)489","Tag":null,"Text":"(string)        _MyEdge REF= pPrimaryHost^.GetEdge( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)490","Tag":null,"Text":"(string)                                             EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)491","Tag":null,"Text":"(string)                                             eError => _HandledError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)914","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)915","Tag":null,"Text":"(string)        // Log remote edge death"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)913","Tag":null,"Text":"(string)        WriteHostLog( CmpLog.LogClass.LOG_INFO, 'Host registered Remote Node Death: %s', TO_STRING( _TopicParser.EdgeId ) );                                   "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)492","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)493","Tag":null,"Text":"(string)        CASE _HandledError OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)494","Tag":null,"Text":"(string)            SPStack.ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE              "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)495","Tag":null,"Text":"(string)                _MyEdge.ProcessNDEATH();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)496","Tag":null,"Text":"(string)        ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)497","Tag":null,"Text":"(string)            xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)498","Tag":null,"Text":"(string)            eError := SPStack.ERROR.OhMy_ThatShouldNotHaveHappened;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)499","Tag":null,"Text":"(string)            WriteHostLog( CmpLog.LogClass.LOG_ERROR,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)501","Tag":null,"Text":"(string)                            'PrimaryHost process NDEATH metric error: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)502","Tag":null,"Text":"(string)                            TO_STRING( _HandledError ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)503","Tag":null,"Text":"(string)        END_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)869","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)901","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)504","Tag":null,"Text":"(string)    SPStack.SparkplugMessageTypes.DBIRTH: //Birth certificate forDevices."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)870","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)505","Tag":null,"Text":"(string)        //TODO: Check if edge is online (isQualityOK).  If not OK, DO NOT process the DBIRTH, instead just send a NCMD/Rebirth"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)506","Tag":null,"Text":"(string)        _MyDevice REF= pPrimaryHost^.GetDevice( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)507","Tag":null,"Text":"(string)                                                 EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)508","Tag":null,"Text":"(string)                                                 DeviceId := _TopicParser.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)509","Tag":null,"Text":"(string)                                                 eError => _HandledError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)510","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)872","Tag":null,"Text":"(string)        CASE _HandledError OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)512","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)873","Tag":null,"Text":"(string)            SPStack.ERROR.GroupIDNotFound: // ==> DETECTED NEW GROUP! must rebirth the edge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)874","Tag":null,"Text":"(string)            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)513","Tag":null,"Text":"(string)                eError := SPStack.ERROR.NotImplemented;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)514","Tag":null,"Text":"(string)                xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)515","Tag":null,"Text":"(string)                WriteHostLog( CmpLog.LogClass.LOG_WARNING,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)517","Tag":null,"Text":"(string)                                'DBIRTH Received with no existing groupID, but haven$'t implemented NCMD Rebirth yet %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)518","Tag":null,"Text":"(string)                                '' );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)875","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)898","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)519","Tag":null,"Text":"(string)            SPStack.ERROR.EdgeIDNotFound: // ==> DETECTED NEW EDGE! must rebirth the edge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)876","Tag":null,"Text":"(string)            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)520","Tag":null,"Text":"(string)                eError := SPStack.ERROR.NotImplemented;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)521","Tag":null,"Text":"(string)                xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)522","Tag":null,"Text":"(string)                WriteHostLog( CmpLog.LogClass.LOG_WARNING,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)524","Tag":null,"Text":"(string)                                'DBIRTH Received with no existing edge, but haven$'t implemented NCMD Rebirth yet %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)525","Tag":null,"Text":"(string)                                '' );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)877","Tag":null,"Text":"(string)                        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)899","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)526","Tag":null,"Text":"(string)            SPStack.ERROR.DeviceIDNotFound: // ==> DETECTED NEW DEVICE!"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)878","Tag":null,"Text":"(string)            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)527","Tag":null,"Text":"(string)                _MyEdge REF= pPrimaryHost^.GetEdge( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)528","Tag":null,"Text":"(string)                                                     EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)529","Tag":null,"Text":"(string)                                                     eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)530","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)531","Tag":null,"Text":"(string)                IF eError = SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)532","Tag":null,"Text":"(string)                    _MyDevice REF= pPrimaryHost^.allocDevicetoEdge( DeviceName := _TopicParser.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)533","Tag":null,"Text":"(string)                                                                     itfEdge := _MyEdge.itfRemoteEoN,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)534","Tag":null,"Text":"(string)                                                                     eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)916","Tag":null,"Text":"(string)                                                                     "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)918","Tag":null,"Text":"(string)                    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)917","Tag":null,"Text":"(string)                    WriteHostLog( CmpLog.LogClass.LOG_INFO, 'Host registered new Remote Device: %s', TO_STRING( _TopicParser.DeviceId ) );                                                                         "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)535","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)536","Tag":null,"Text":"(string)                    IF eError = SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)537","Tag":null,"Text":"(string)                        _MyDevice.ProcessDBIRTH( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)538","Tag":null,"Text":"(string)                                                 NodeName := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)539","Tag":null,"Text":"(string)                                                 GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)540","Tag":null,"Text":"(string)                                                 DeviceName := _TopicParser.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)541","Tag":null,"Text":"(string)                                                 pMessage := _RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)542","Tag":null,"Text":"(string)                                                 xError => xError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)543","Tag":null,"Text":"(string)                                                 eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)879","Tag":null,"Text":"(string)                                                 "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)544","Tag":null,"Text":"(string)                    ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)545","Tag":null,"Text":"(string)                        xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)546","Tag":null,"Text":"(string)                        //eError := eError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)547","Tag":null,"Text":"(string)                    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)880","Tag":null,"Text":"(string)                    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)548","Tag":null,"Text":"(string)                ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)549","Tag":null,"Text":"(string)                    xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)550","Tag":null,"Text":"(string)                    //eError := eError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)551","Tag":null,"Text":"(string)                END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)881","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)900","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)552","Tag":null,"Text":"(string)            SPStack.ERROR.NO_ERROR: // ==> UPDATE EXISTING DEVICE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)882","Tag":null,"Text":"(string)            "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)553","Tag":null,"Text":"(string)                _MyDevice.ProcessDBIRTH( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)554","Tag":null,"Text":"(string)                                         NodeName := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)555","Tag":null,"Text":"(string)                                         GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)556","Tag":null,"Text":"(string)                                         DeviceName := _TopicParser.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)557","Tag":null,"Text":"(string)                                         pMessage := _RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)558","Tag":null,"Text":"(string)                                         xError => xError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)559","Tag":null,"Text":"(string)                                         eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)883","Tag":null,"Text":"(string)                                         "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)560","Tag":null,"Text":"(string)        ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)561","Tag":null,"Text":"(string)            ; //{info 'TODO: maybe some sort of error??'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)562","Tag":null,"Text":"(string)        END_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)884","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)895","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)563","Tag":null,"Text":"(string)    SPStack.SparkplugMessageTypes.DDEATH: //Death certificate for Devices."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)885","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)564","Tag":null,"Text":"(string)        _MyDevice REF= pPrimaryHost^.GetDevice( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)565","Tag":null,"Text":"(string)                                                 EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)566","Tag":null,"Text":"(string)                                                 DeviceId := _TopicParser.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)567","Tag":null,"Text":"(string)                                                 eError => _HandledError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)919","Tag":null,"Text":"(string)                                                 "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)921","Tag":null,"Text":"(string)        // Log remote edge death"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)920","Tag":null,"Text":"(string)        WriteHostLog( CmpLog.LogClass.LOG_INFO, 'Host registered Remote Edge Death: %s', TO_STRING( _TopicParser.DeviceId ) );                                                     "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)568","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)569","Tag":null,"Text":"(string)        CASE _HandledError OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)570","Tag":null,"Text":"(string)            SPStack.ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE              "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)571","Tag":null,"Text":"(string)                _MyDevice.ProcessDDEATH();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)572","Tag":null,"Text":"(string)        ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)573","Tag":null,"Text":"(string)            xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)574","Tag":null,"Text":"(string)            eError := SPStack.ERROR.OhMy_ThatShouldNotHaveHappened;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)575","Tag":null,"Text":"(string)            WriteHostLog( CmpLog.LogClass.LOG_ERROR,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)577","Tag":null,"Text":"(string)                            'PrimaryHost process DDEATH metric error: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)578","Tag":null,"Text":"(string)                            TO_STRING( _HandledError ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)579","Tag":null,"Text":"(string)        END_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)886","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)896","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)580","Tag":null,"Text":"(string)    SPStack.SparkplugMessageTypes.DDATA: // Device data message. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)887","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)581","Tag":null,"Text":"(string)        _MyDevice REF= pPrimaryHost^.GetDevice( GroupId := _TopicParser.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)582","Tag":null,"Text":"(string)                                                 EdgeId := _TopicParser.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)583","Tag":null,"Text":"(string)                                                 DeviceId := _TopicParser.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)584","Tag":null,"Text":"(string)                                                 eError => _HandledError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)585","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)586","Tag":null,"Text":"(string)        CASE _HandledError OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)587","Tag":null,"Text":"(string)            SPStack.ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)588","Tag":null,"Text":"(string)                _MyDevice.ProcessDDATA( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)589","Tag":null,"Text":"(string)                                        pMessage := _RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)590","Tag":null,"Text":"(string)                                        xError => xError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)591","Tag":null,"Text":"(string)                                        eError => eError );                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)592","Tag":null,"Text":"(string)        ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)593","Tag":null,"Text":"(string)            xError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)594","Tag":null,"Text":"(string)            eError := SPStack.Error.DeviceIDNotFound;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)595","Tag":null,"Text":"(string)            WriteHostLog( CmpLog.LogClass.LOG_ERROR,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)597","Tag":null,"Text":"(string)                            'PrimaryHost process DDATA metric error: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)598","Tag":null,"Text":"(string)                            TO_STRING( _HandledError ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)599","Tag":null,"Text":"(string)        END_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)892","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)897","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)600","Tag":null,"Text":"(string)    SPStack.SparkplugMessageTypes.NCMD, //Node command message."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)893","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)601","Tag":null,"Text":"(string)        SPStack.SparkplugMessageTypes.DCMD, //Device command message."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)602","Tag":null,"Text":"(string)        SPStack.SparkplugMessageTypes.STATE: //Critical application state message"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)603","Tag":null,"Text":"(string)        ; //do nothing, ignore these"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)894","Tag":null,"Text":"(string)        "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)604","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)605","Tag":null,"Text":"(string)    ; //{info 'TODO: maybe some sort of error??'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)209","Tag":null,"Text":"(string)END_CASE"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)813","Tag":null,"Text":"(string)FUNCTION_BLOCK FB_PrimaryHostMessageConsumer"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)814","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)830","Tag":null,"Text":"(string)    pPrimaryHost : POINTER TO FB_PrimaryHost;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)827","Tag":null,"Text":"(string)    pMQTT : POINTER TO FB_PrimaryHostMQTT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)815","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)831","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)834","Tag":null,"Text":"(string)    xError : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)832","Tag":null,"Text":"(string)    eError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)833","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)818","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)837","Tag":null,"Text":"(string)    //_itfPrimaryHost : IPrimaryHost;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)840","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)829","Tag":null,"Text":"(string)    _MQTT_eError : MQTT.MQTT_ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)819","Tag":null,"Text":"(string)    _RecvMesg : REFERENCE TO SPStack.FB_PayloadSimpleDecoder;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)820","Tag":null,"Text":"(string)    _RecvTopic : WSTRING( SPStack.GC_Sparkplug.supported_string_lengths );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)821","Tag":null,"Text":"(string)    _HandledError : SPStack.ERROR; // an error that will be given back by a function, but we can handle the error. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)822","Tag":null,"Text":"(string)    _MyGroupId : REFERENCE TO FB_GroupId;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)823","Tag":null,"Text":"(string)    _MyEdge : REFERENCE TO FB_RemoteEdge;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)824","Tag":null,"Text":"(string)    _MyDevice : REFERENCE TO FB_RemoteDevice;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)825","Tag":null,"Text":"(string)    _TopicParser : FB_TopicParser;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1","Tag":null,"Text":"(string)END_VAR"}}]}}}}},"UniqueIdGenerator":"(string)921","POULevel":{"@Type":"8e575c5b:Enum","@Value":"Standard"},"ChildObjectGuids":{"@Type":"ArrayList:IList","@Value":[]},"AddAttributeSubsequent":"(bool)False"}},"TypeInfos":{"0db3d7bb":"{0db3d7bb-cde0-4416-9a7b-ce49a0124323}","3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","6f9dac99":"{6f9dac99-8de1-4efc-8465-68ac443b7d08}","8e575c5b":"{8e575c5b-1d37-49c6-941b-5c0ec7874787}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","ArrayList":"System.Collections.ArrayList","bool":"System.Boolean","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}