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

Download this file

5 lines (5 with data), 6.3 kB

Gx_ly!0…jüo3ʶe9eŮuŠ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,P                                 '%s' );(IF iCharPos = 0 THEN    RETURN;END_IFN// add message to registered Device LogJsText := Standard.REPLACE( msgFmtStr,D                           strArg,:                           2,L                           iCharPos );@IF LEN( stext ) > uiMaxSize THENŚ    // log the right side of the message first (be carefull of offset)z    GVL_SparkplugB._CmpSparkplugLog.AddLogEntry( msgCtrlMask,f                                                 0, |                                                 RIGHT( sText,!®                                                        (LEN( sText ) - uiMaxSize) ) );"2    // then the left side#z    GVL_sparkplugB._CmpSparkplugLog.AddLogEntry( msgCtrlMask,$z                                                 LEFT( sText,%Š                                                       uiMaxSize ) );&ELSE'r                                                 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 ), 0f		            msgFmtStr := 'Ammount of tests : %s',1J			        strArg := uiTestAmmount );2	3P    results into the following logstring4:        Ammount of tests : 3 58	Returns TRUE when finnished6*)7${attribute 'hide'}8<FUNCTION WriteDeviceLog : BOOL9VAR_INPUT:     msgCtrlMask : DWORD;       // use UDINT_TO_DWORD( CmpLog.LogClass.LOG_.... );’    msgFmtStr   : T_MaxString; // Usage example: ' Ammount of tests : %s'<|    strArg      : T_MaxString; // Usage example: uiTestAmmount=END_VAR>VAR?:    uiMaxSize : USINT := 127;@8    sText     : T_MaxString;A(    iCharPos  : INT;B"UniqueIdGeneratorC326DPOULevelEL{8e575c5b-1d37-49c6-941b-5c0ec7874787}FStandardG ChildObjectGuidsH8System.Collections.ArrayListI,AddAttributeSubsequentJboolĐĐ-ĐĐ	E
$ĐĐ
­$ÚĐ-ĐĐ
­%ÚĐ-ĐĐ
­&ÚĐ-ĐĐ
­'ÚĐ-ĐĐ
­(ÚĐ-ĐĐ
­)ÚĐ-ĐĐ
­*ÚĐ-ĐĐ
­+ÚĐ-ĐĐ
­,ÚĐ-ĐĐ
­-ÚĐ-ĐĐ
­.ÚĐ-ĐĐ
­/ÚĐ-ĐĐ
­0ÚĐ-ĐĐ
­1ÚĐ-ĐĐ
­2ÚĐ-ĐĐ
­3ÚĐ-ĐĐ
­4ÚĐ-ĐĐ
­5ÚĐ-ĐĐ
­6ÚĐ-ĐĐ
­7ÚĐ- ĐĐ
­8ÚĐ-!ĐĐ
­9ÚĐ-ĐĐ
­:ÚĐ-"ĐĐ
­;ÚĐ-#ĐĐ
­<ÚĐ-ĐĐ
­=ÚĐ-ĐĐ
­>ÚĐ-$ĐĐ
­?ÚĐ-%ĐĐ
­@ÚĐ-&ĐĐ
­AÚĐ-#ĐĐ
­BÚĐ-ĐĐ
­CÚĐ-ĐĐ
­DÚĐ-'ĐĐ
­EÚĐ-ĐĐ
­FÚĐ-ĐĐ
­ÚĐ-(Đ)*Đ	E
ĐĐ
­	ÚĐ-ĐĐ
­
ÚĐ-+ĐĐ
­ÚĐ-,ĐĐ
­ÚĐ--ĐĐ
­
ÚĐ-ĐĐ
­ÚĐ-.ĐĐ
­ÚĐ-/ĐĐ
­ÚĐ-0ĐĐ
­ÚĐ-1ĐĐ
­ÚĐ-2ĐĐ
­ÚĐ-3ĐĐ
­ÚĐ-4ĐĐ
­ÚĐ-2ĐĐ
­ÚĐ-5ĐĐ
­ÚĐ-6ĐĐ
­ÚĐ-7ĐĐ
­ÚĐ-8ĐĐ
­ÚĐ-9ĐĐ
­ÚĐ-:ĐĐ
­ÚĐ-;ĐĐ
­ÚĐ-<ĐĐ
­ÚĐ-=ĐĐ
­ÚĐ->ĐĐ
­ ÚĐ-?ĐĐ
­!ÚĐ-@ĐĐ
­"ÚĐ-AĐĐ
­#ÚĐ-=ĐĐ
­ÚĐ-ĐB-CĐDE-FGHĐIJ­