[r818]: / branches / FeatureBranches / Debuglogging / SparkplugB / Function Blocks / FB_Device / FB_DeviceStateMachine / SetSessionState / svnobj  Maximize  Restore  History

Download this file

13 lines (12 with data), 1.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// Sets the new session state and logs it
{attribute 'hide'}
METHOD SetSessionState : SparkplugSessionStateType
VAR_INPUT
    NewState : SparkplugSessionStateType;
IF SessionState <> NewState THEN
    WriteDeviceLog( gc_sparkplug.CMP_EDGE,
                    CmpLog.LogClass.LOG_INFO,
                    'Device State: %s',
                    TO_STRING( NewState ) );
END_IF
SetSessionState := NewState;