--- a
+++ b/project/sparkplug™_mqtt_edge_and_host-stack_b9741afd/functions_a1970cad/writestacklog_4faf44db/4faf44db355b496782545b291732f959.object
@@ -0,0 +1 @@
+{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)4faf44db-355b-4967-8254-5b291732f959","ParentGuid":"(Guid)00000000-0000-0000-0000-000000000000","Name":"(string)WriteStackLog","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)a1970cad-fb7e-4f32-9f9c-fd8f237326f9"}]}}}}]},"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)645","Tag":null,"Text":"(string)iCharPos := Standard.FIND( sMsg, '%s' );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)646","Tag":null,"Text":"(string)IF iCharPos <> 0 THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)647","Tag":null,"Text":"(string)    // Replace the %s with the argument if the %s is found in the text"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)648","Tag":null,"Text":"(string)    sText := Standard.REPLACE( sMsg, sArg, 2, iCharPos );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)612","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)613","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)614","Tag":null,"Text":"(string)// add message to registered Device Log"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)616","Tag":null,"Text":"(string)IF LEN( sText ) > uiMaxSize THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)617","Tag":null,"Text":"(string)    // log the right side of the message first (be carefull of offset)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)618","Tag":null,"Text":"(string)    sRightText := RIGHT( sText,(LEN( sText ) - uiMaxSize) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)619","Tag":null,"Text":"(string)    eLogError := GVL_sparkplug._CmpStackLog.AddLogEntry( sRightText, udiCmpID, udiLogClass);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)620","Tag":null,"Text":"(string)    // then the left side"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)621","Tag":null,"Text":"(string)    sLeftText := LEFT( sText, uiMaxSize );    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)622","Tag":null,"Text":"(string)    eLogError := GVL_sparkplug._CmpStackLog.AddLogEntry( sLeftText, udiCmpID, udiLogClass);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)623","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)624","Tag":null,"Text":"(string)    eLogError := GVL_sparkplug._CmpStackLog.AddLogEntry( sText, udiCmpID, udiLogClass);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)625","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)260","Tag":null,"Text":"(string)WriteStackLog := TRUE;"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)576","Tag":null,"Text":"(string)(* "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)577","Tag":null,"Text":"(string)    Adds a message to the log, if the message is longer then 127 characters"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)578","Tag":null,"Text":"(string)    the entry splits over log entries (max 255 chars = 2 log entries)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)579","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)580","Tag":null,"Text":"(string)    Usage example:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)581","Tag":null,"Text":"(string)    WriteStackLog( CmpLog.LogClass.LOG_INFO, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)582","Tag":null,"Text":"(string)\t\t            sMsg := 'Ammount of tests : %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)583","Tag":null,"Text":"(string)\t\t\t        sArg := uiTestAmmount );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)584","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)585","Tag":null,"Text":"(string)    results into the following logstring"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)586","Tag":null,"Text":"(string)    INFO     Ammount of tests : 3  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)587","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)588","Tag":null,"Text":"(string)\tReturns TRUE when finished"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)589","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)590","Tag":null,"Text":"(string){attribute 'hide'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)591","Tag":null,"Text":"(string)FUNCTION WriteStackLog : BOOL"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)592","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)593","Tag":null,"Text":"(string)    udiCmpID : UDINT(4096..8191);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)594","Tag":null,"Text":"(string)\tudiLogClass : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)595","Tag":null,"Text":"(string)    sMsg : T_MaxString; // Usage example: ' Ammount of tests : %s'"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)596","Tag":null,"Text":"(string)    sArg : T_MaxString; // Usage example: uiTestAmmount"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)597","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)598","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)599","Tag":null,"Text":"(string)    eLogError : ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)600","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)601","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)602","Tag":null,"Text":"(string)    sText : T_MaxString;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)603","Tag":null,"Text":"(string)    iCharPos : INT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)604","Tag":null,"Text":"(string)    sRightText : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)605","Tag":null,"Text":"(string)    sLeftText : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)606","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)607","Tag":null,"Text":"(string)VAR CONSTANT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)608","Tag":null,"Text":"(string)    uiMaxSize : USINT := 127;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1","Tag":null,"Text":"(string)END_VAR"}}]}}}}},"UniqueIdGenerator":"(string)648","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"}
\ No newline at end of file