module CTdsTorqueWrenchLedNotification
    use OperationScenariosModule
    implicit none
    contains
    
    subroutine Evaluate_TorqueWrenchLed()
        implicit none
        
        if (data%Configuration%Hoisting%DriveType == TopDrive_DriveType) then
#ifdef OST
            print*, 'Evaluate_TorqueWrenchLed=TopDrive'
#endif

            !TOPDRIVE-CODE=81
            if((Get_TdsBackupClamp() == BACKUP_CLAMP_OFF_BEGIN .or.&
                Get_TdsBackupClamp() == BACKUP_CLAMP_FW_BEGIN) .and.&
                data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then
                call Set_TorqueWrenchLed(LED_BLINK)
                return
            endif
                
            !TOPDRIVE-CODE=81
            if(Get_TdsBackupClamp() == BACKUP_CLAMP_FW_END .and.&
                data%EquipmentControl%TopDrivePanel%TopDriveTdsPowerState /= TdsPower_OFF) then
                call Set_TorqueWrenchLed(LED_ON)
                return
            endif
                
             
            call Set_TorqueWrenchLed(LED_OFF)

        endif
        
        
        
        
        
        
        
        
        
        if (data%Configuration%Hoisting%DriveType == Kelly_DriveType) then
#ifdef OST
            print*, 'Evaluate_SwingLed=Kelly'
#endif

            
        endif
        
     
        
    end subroutine
    
    ! subroutine Subscribe_TorqueWrenchLed()
    !     implicit none
        
    ! end subroutine
    
end module CTdsTorqueWrenchLedNotification