[b7862c]: / project / sparkplug™_mqtt_host_b9741afd / function_blocks_8ad6e219 / fb_primaryhost_ec6863e3 / fb_primaryhostmessageconsumer_070fbc41 / consumedbirthmessage_c3ef471d / c3ef471d897543d7971054e31eac006f.object  Maximize  Restore  History

Download this file

1 lines (1 with data), 12.5 kB

1
{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)c3ef471d-8975-43d7-9710-54e31eac006f","ParentGuid":"(Guid)070fbc41-83aa-457a-b520-a064079b516d","Name":"(string)ConsumeDBIRTHMessage","Properties":{"@Type":"2c41fa04:IDictionary","@Value":{}},"TypeGuid":"(Guid)f8a58466-d7f6-439f-bbb8-d4600e41d099","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}","Guid":"System.Guid","string":"System.String"}},"object":{"Graph":{"@Type":"f8a58466","@Value":{"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)1220","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)1221","Tag":null,"Text":"(string)MyDevice REF= pPrimaryHost^.GetDevice( GroupId := pTopicParser^.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1222","Tag":null,"Text":"(string)                                       EdgeId := pTopicParser^.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1223","Tag":null,"Text":"(string)                                       DeviceId := pTopicParser^.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1224","Tag":null,"Text":"(string)                                       eError => GetDeviceError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1225","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1226","Tag":null,"Text":"(string)CASE GetDeviceError OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1227","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1228","Tag":null,"Text":"(string)    SPStack.ERROR.GroupIDNotFound: // ==> DETECTED NEW GROUP! must rebirth the edge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1229","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1230","Tag":null,"Text":"(string)        ProcessDBIRTHerror := SPStack.ERROR.NotImplemented;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1231","Tag":null,"Text":"(string)        xProcessDBIRTHError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1232","Tag":null,"Text":"(string)        WriteHostLog( CmpLog.LogClass.LOG_WARNING,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1233","Tag":null,"Text":"(string)                      'DBIRTH Received with no existing groupID, but haven$'t implemented NCMD Rebirth yet %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1234","Tag":null,"Text":"(string)                      '' );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1235","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1236","Tag":null,"Text":"(string)    SPStack.ERROR.EdgeIDNotFound: // ==> DETECTED NEW EDGE! must rebirth the edge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1237","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1238","Tag":null,"Text":"(string)        ProcessDBIRTHerror := SPStack.ERROR.NotImplemented;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1239","Tag":null,"Text":"(string)        xProcessDBIRTHError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1240","Tag":null,"Text":"(string)        WriteHostLog( CmpLog.LogClass.LOG_WARNING,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1241","Tag":null,"Text":"(string)                      'DBIRTH Received with no existing edge, but haven$'t implemented NCMD Rebirth yet %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1242","Tag":null,"Text":"(string)                      '' );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1243","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1244","Tag":null,"Text":"(string)    SPStack.ERROR.DeviceIDNotFound: // ==> DETECTED NEW DEVICE!"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1245","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1246","Tag":null,"Text":"(string)        MyEdge REF= pPrimaryHost^.GetEdge( GroupId := pTopicParser^.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1247","Tag":null,"Text":"(string)                                           EdgeId := pTopicParser^.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1248","Tag":null,"Text":"(string)                                           eError => GetEdgeError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1249","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1250","Tag":null,"Text":"(string)        IF GetEdgeError = SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1251","Tag":null,"Text":"(string)            MyDevice REF= pPrimaryHost^.allocDevicetoEdge( DeviceName := pTopicParser^.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1252","Tag":null,"Text":"(string)                                                           itfEdge := MyEdge.itfRemoteEoN,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1253","Tag":null,"Text":"(string)                                                           eError => allocDevicetoEdge );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1255","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1256","Tag":null,"Text":"(string)            WriteHostLog( CmpLog.LogClass.LOG_INFO, 'Host registered new Remote Device: %s', TO_STRING( pTopicParser^.DeviceId ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1257","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1258","Tag":null,"Text":"(string)            IF allocDevicetoEdge = SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1259","Tag":null,"Text":"(string)                MyDevice.ProcessDBIRTH( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1260","Tag":null,"Text":"(string)                                        NodeName := pTopicParser^.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1261","Tag":null,"Text":"(string)                                        GroupId := pTopicParser^.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1262","Tag":null,"Text":"(string)                                        DeviceName := pTopicParser^.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1263","Tag":null,"Text":"(string)                                        pMessage := RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1264","Tag":null,"Text":"(string)                                        xError => xProcessDBIRTHError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1265","Tag":null,"Text":"(string)                                        eError => ProcessDBIRTHerror );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1266","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1267","Tag":null,"Text":"(string)            ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1268","Tag":null,"Text":"(string)                xProcessDBIRTHError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1269","Tag":null,"Text":"(string)                //eError := eError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1270","Tag":null,"Text":"(string)            END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1271","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1272","Tag":null,"Text":"(string)        ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1273","Tag":null,"Text":"(string)            xProcessDBIRTHError := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1274","Tag":null,"Text":"(string)            //eError := eError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1275","Tag":null,"Text":"(string)        END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1276","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1277","Tag":null,"Text":"(string)    SPStack.ERROR.NO_ERROR: // ==> UPDATE EXISTING DEVICE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1278","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1279","Tag":null,"Text":"(string)        MyDevice.ProcessDBIRTH( itfPrimaryHost := pPrimaryHost^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1280","Tag":null,"Text":"(string)                                NodeName := pTopicParser^.EdgeId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1281","Tag":null,"Text":"(string)                                GroupId := pTopicParser^.GroupId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1282","Tag":null,"Text":"(string)                                DeviceName := pTopicParser^.DeviceId,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1283","Tag":null,"Text":"(string)                                pMessage := RecvMesg,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1284","Tag":null,"Text":"(string)                                xError => xProcessDBIRTHError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1285","Tag":null,"Text":"(string)                                eError => ProcessDBIRTHerror );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1286","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1287","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1288","Tag":null,"Text":"(string)    ; //{info 'TODO: maybe some sort of error??'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)5","Tag":null,"Text":"(string)END_CASE"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)1051","Tag":null,"Text":"(string)METHOD PRIVATE ConsumeDBIRTHMessage"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1052","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1053","Tag":null,"Text":"(string)    pPrimaryHost : POINTER TO FB_PrimaryHost;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1289","Tag":null,"Text":"(string)    pTopicParser : POINTER TO FB_TopicParser;     "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1054","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1055","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1056","Tag":null,"Text":"(string)    RecvMesg : REFERENCE TO SPStack.FB_Payload;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1057","Tag":null,"Text":"(string)    RecvTopic : WSTRING( SPStack.GC_Sparkplug.supported_string_lengths );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1058","Tag":null,"Text":"(string)    TopicParser : FB_TopicParser; "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1059","Tag":null,"Text":"(string)    MyDevice : REFERENCE TO FB_RemoteDevice;    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1061","Tag":null,"Text":"(string)    MyEdge : REFERENCE TO FB_RemoteEdge;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1062","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1063","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1064","Tag":null,"Text":"(string)    GetDeviceError : SPStack.ERROR; // an error that will be given back by a function, but we can handle the error."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1211","Tag":null,"Text":"(string)    GetEdgeError : SPStack.ERROR; // an error that will be given back by a function, but we can handle the error."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1212","Tag":null,"Text":"(string)    allocDevicetoEdge : SPStack.ERROR; // an error that will be given back by a function, but we can handle the error."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1067","Tag":null,"Text":"(string)    ProcessDBIRTHerror : SPStack.ERROR; // an error that will be given back by a function, but we can handle the error"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1069","Tag":null,"Text":"(string)    xProcessDBIRTHError : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1070","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1","Tag":null,"Text":"(string)"}}]}}}}}}},"TypeInfos":{"3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","f8a58466":"{f8a58466-d7f6-439f-bbb8-d4600e41d099}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}