[r538]: / branches / h-hermsen / mqttsparkplugb / SparkplugB / Functions / WriteDeviceLog / svnobj  Maximize  Restore  History

Download this file

4 lines (4 with data), 5.0 kB

Gx_lP!0…jüoç!r‡™Aöéd£System.StringL{6f9dac99-8de1-4efc-8465-68ac443b7d08}SpecialFuncL{0db3d7bb-cde0-4416-9a7b-ce49a0124323}NoneImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocument	L{f3878285-8e4f-490b-bb1b-9acbb7eb04db}
TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagText0WriteDeviceLog := FALSE;ViCharPos := Standard.FIND(msgFmtStr, '%s');*IF iCharPos = 0 THEN 	RETURN; END_IFN// add message to registered Device LogtsText := Standard.REPLACE(msgFmtStr, strArg, 2, iCharPos);>IF LEN(stext) > uiMaxSize THEN	†	// log the right side of the message first (be carefull of offset)Î	GVL_SparkplugB._CmpSparkplugLog.AddLogEntry(msgCtrlMask, 0, 0, RIGHT(sText, (LEN(sText)-uiMaxSize)) );,	// then the left side²	GVL_sparkplugB._CmpSparkplugLog.AddLogEntry(msgCtrlMask, 0, 0, LEFT(sText, uiMaxSize) );ELSEŽ	GVL_sparkplugB._CmpSparkplugLog.AddLogEntry(msgCtrlMask, 0, 0, sText);.WriteDeviceLog := TRUE;Interface L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}!(* "–    Adds a message to the log, if the message is longer then 127 characters#–    ithe entry splits into two log messages (max 255 chars = 2 log entries)$%$    Usage example:&ž    WriteDeviceLog( msgCtrlMask := UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ), 'f		            msgFmtStr := 'Ammount of tests : %s',(J			        strArg := uiTestAmmount );)	*P    results into the following logstring+:        Ammount of tests : 3 ,8	Returns TRUE when finnished-*).${attribute 'hide'}/NFUNCTION INTERNAL WriteDeviceLog : BOOL0VAR_INPUT1Ž	msgCtrlMask : DWORD; // use UDINT_TO_DWORD( CmpLog.LogClass.LOG_.... )2ˆ	msgFmtStr : T_MaxString; // Usage example: ' Ammount of tests : %s'3l	strArg : T_MaxString; // Usage example: uiTestAmmount4END_VAR5VAR66	uiMaxSize : USINT := 127; 7*	sText : T_MaxString;8 	iCharPos : INT;9"UniqueIdGenerator:264;POULevel<L{8e575c5b-1d37-49c6-941b-5c0ec7874787}=Standard> ChildObjectGuids?8System.Collections.ArrayList@,AddAttributeSubsequentAboolÐÐ-ÐÐ	E
ÐÐ
­ÚÐ-ÐÐ
­çÚÐ-ÐÐ
­éÚÐ-ÐÐ
­êÚÐ-ÐÐ
­ëÚÐ-ÐÐ
­íÚÐ-ÐÐ
­îÚÐ-ÐÐ
­ðÚÐ-ÐÐ
­ñÚÐ-ÐÐ
­òÚÐ-ÐÐ
­óÚÐ-ÐÐ
­ôÚÐ-ÐÐ
­õÚÐ-ÐÐ
­öÚÐ-ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-Ð Ð	E
ÐÐ
­÷ÚÐ-!ÐÐ
­øÚÐ-"ÐÐ
­ùÚÐ-#ÐÐ
­úÚÐ-$ÐÐ
­ûÚÐ-%ÐÐ
­üÚÐ-&ÐÐ
­ýÚÐ-'ÐÐ
­þÚÐ-(ÐÐ
­ÿÚÐ-)ÐÐ
­ÚÐ-*ÐÐ
­ÚÐ-+ÐÐ
­ÚÐ-)ÐÐ
­ÚÐ-,ÐÐ
­ÛÚÐ--ÐÐ
­ÚÐ-.ÐÐ
­ÜÚÐ-/ÐÐ
­ÝÚÐ-0ÐÐ
­ÞÚÐ-1ÐÐ
­ßÚÐ-2ÐÐ
­àÚÐ-3ÐÐ
­áÚÐ-4ÐÐ
­âÚÐ-5ÐÐ
­ãÚÐ-6ÐÐ
­äÚÐ-7ÐÐ
­åÚÐ-8ÐÐ
­æÚÐ-4ÐÐ
­ÚÐ-$Ð9-:Ð;<-=>?Ð@A­