epics-modules / iocStats

EPICS IOC Status and Control
Other
12 stars 40 forks source link

Add scanOnce/callback queue status #30

Closed mark0n closed 5 years ago

mark0n commented 6 years ago

Reports data about scanOnce and callback queue size and usage.

This PR requires a few modifications to EPICS Base.

mark0n commented 6 years ago

I'm assuming that my patch will make it into EPICS Base 3.16.2. If that's not the case I might need to update the if statements that short-circuit the calls to the new EPICS Base functions.

anjohnson commented 5 years ago

This PR does now build successfully against the just-released 3.16.2 version of Base, but it needs to be modified so it doesn't break when built against earlier versions that don't provide the new *QueueStats APIs. Check the Travis-CI build logs for details.

mark0n commented 5 years ago

@anjohnson, thanks for the heads up. With my latest modifications it builds fine against older EPICS Base versions.

anjohnson commented 5 years ago

@mark0n ... but it probably won't build against Base-7.0.1.

Sorry, If I had thought about this sooner I would have suggested adding a #define to one of the include files to indicate whether the new API was included or not, but 3.16.2 is already tagged and published.

anjohnson commented 5 years ago

You could use this expression instead, since there will be no further 3.16 releases:

#if (EPICS_VERSION_INT == VERSION_INT(3, 16, 2, 0)) || (EPICS_VERSION_INT >= VERSION_INT(7, 0, 2, 0))

Might be worth making that into a macro instead of pasting it throughout the source code though.

mark0n commented 5 years ago

Ah, good catch. Done.