my issue is to deactivate a loggingblock in CanOE by using it's COM interface. As programming langugage I'm using Python. I have Access to the LoggingCollection and can set the filename. Now I will deactivate this block, but I can't find a way to do it. Has anyone an idea to do it? In the CanOE help they write About the data flow and hot spots to Control the data.

I have a online Setup. I guess that I Need to Access a Special object to deactivate teh logging block. The members of the Block itself has no activate/deactivate state.

The Setup is simple as possible. Real Bus to a logging block. All hot spots at the Moment are activated. dbc file is correctly added.

self.App = CreateObject('CANoe.Application')
self.logging = self.App.Configuration.OnlineSetup.LoggingCollection(1)
self.logging.FullName = 'Trace_{MeasurementStart}.blf'
if bLoggingActivated == false:
    --> What should I do here?
self.App.Measurement.Start()

Thanks for help

1 Answers

0
M. Spiller On Best Solutions

As far as I know, you cannot disable the block itself, but you can disable logging of all events.

This can be done on the LoggingFilter object which can be gotten from the Logging object.

In your case this would be something like this:

self.logging.Filter.Disable(0)

0 means all events. Check the CANoe documentation for other values.