[r836]: / branches / FeatureBranches / LogPoolMutations / SparkplugB / Functions / WriteDeviceLog / svnobj  Maximize  Restore  History

Download this file

4 lines (4 with data), 5.5 kB

Gx_l<!0…jüoûñV‰ðbüú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
longTagTextPiCharPos := Standard.FIND( sMsg, '%s' );(IF iCharPos = 0 THEN    RETURN;END_IFN// add message to registered Device LogjsText := Standard.REPLACE( sMsg, sArg, 2, iCharPos );@IF LEN( sText ) > uiMaxSize THENŒ    // log the right side of the message first (be carefull of offset)x    sRightText := RIGHT( sText,(LEN( sText ) - uiMaxSize) );À    eLogError := GVL_sparkplug._CmpSparkplugLog.AddLogEntry( sRightText, udiCmpID, udiLogClass);2    // then the left side\    sLeftText := LEFT( sText, uiMaxSize );    ¾    eLogError := GVL_sparkplug._CmpSparkplugLog.AddLogEntry( sLeftText, udiCmpID, udiLogClass);ELSE¶    eLogError := GVL_sparkplug._CmpSparkplugLog.AddLogEntry( sText, udiCmpID, udiLogClass); .WriteDeviceLog := TRUE;!Interface"L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}#(* $–    Adds a message to the log, if the message is longer then 127 characters%Š    the entry splits over log entries (max 255 chars = 2 log entries)&$    Usage example:'\    WriteDeviceLog( CmpLog.LogClass.LOG_INFO, (\		            sMsg := 'Ammount of tests : %s',)F			        sArg := uiTestAmmount );*	+P    results into the following logstring,F    INFO     Ammount of tests : 3  -6	Returns TRUE when finished.*)/${attribute 'hide'}0<FUNCTION WriteDeviceLog : BOOL1VAR_INPUT2B    udiCmpID : UDINT(4096..8191);3*	udiLogClass : UDINT;4„    sMsg : T_MaxString; // Usage example: ' Ammount of tests : %s'5n    sArg : T_MaxString; // Usage example: uiTestAmmount6END_VAR7VAR_OUTPUT8,    eLogError : ERROR;9VAR:0    sText : T_MaxString;;&    iCharPos : INT;<0    sRightText : STRING;=.    sLeftText : STRING;>VAR CONSTANT?:    uiMaxSize : USINT := 127;@"UniqueIdGeneratorA625BPOULevelCL{8e575c5b-1d37-49c6-941b-5c0ec7874787}DStandardE ChildObjectGuidsF8System.Collections.ArrayListG,AddAttributeSubsequentHboolÐÐ-ÐÐ	E
ÐÐ
­aÚÐ-ÐÐ
­bÚÐ-ÐÐ
­cÚÐ-ÐÐ
­dÚÐ-ÐÐ
­eÚÐ-ÐÐ
­fÚÐ-ÐÐ
­gÚÐ-ÐÐ
­hÚÐ-ÐÐ
­iÚÐ-ÐÐ
­jÚÐ-ÐÐ
­kÚÐ-ÐÐ
­lÚÐ-ÐÐ
­mÚÐ-ÐÐ
­nÚÐ-ÐÐ
­oÚÐ-ÐÐ
­pÚÐ-ÐÐ
­qÚÐ-ÐÐ
­ÚÐ- Ð!"Ð	E
"ÐÐ
­@ÚÐ-#ÐÐ
­AÚÐ-$ÐÐ
­BÚÐ-%ÐÐ
­CÚÐ-ÐÐ
­DÚÐ-&ÐÐ
­EÚÐ-'ÐÐ
­FÚÐ-(ÐÐ
­GÚÐ-)ÐÐ
­HÚÐ-*ÐÐ
­IÚÐ-+ÐÐ
­JÚÐ-,ÐÐ
­KÚÐ-*ÐÐ
­LÚÐ--ÐÐ
­MÚÐ-.ÐÐ
­NÚÐ-/ÐÐ
­OÚÐ-0ÐÐ
­PÚÐ-1ÐÐ
­QÚÐ-2ÐÐ
­RÚÐ-3ÐÐ
­SÚÐ-4ÐÐ
­TÚÐ-5ÐÐ
­UÚÐ-6ÐÐ
­VÚÐ-7ÐÐ
­WÚÐ-8ÐÐ
­XÚÐ-6ÐÐ
­YÚÐ-9ÐÐ
­ZÚÐ-:ÐÐ
­[ÚÐ-;ÐÐ
­\ÚÐ-<ÐÐ
­]ÚÐ-=ÐÐ
­^ÚÐ-6ÐÐ
­_ÚÐ->ÐÐ
­`ÚÐ-?ÐÐ
­ÚÐ-6Ð@-AÐBC-DEFÐGH­