mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-03 03:42:35 +01:00
Initial commit of open source Workload Automation.
This commit is contained in:
30
wlauto/external/louie/signal.py
vendored
Normal file
30
wlauto/external/louie/signal.py
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"""Signal class.
|
||||
|
||||
This class is provided as a way to consistently define and document
|
||||
signal types. Signal classes also have a useful string
|
||||
representation.
|
||||
|
||||
Louie does not require you to use a subclass of Signal for signals.
|
||||
"""
|
||||
|
||||
|
||||
class _SIGNAL(type):
|
||||
"""Base metaclass for signal classes."""
|
||||
|
||||
def __str__(cls):
|
||||
return '<Signal: %s>' % (cls.__name__, )
|
||||
|
||||
|
||||
class Signal(object):
|
||||
|
||||
__metaclass__ = _SIGNAL
|
||||
|
||||
|
||||
class All(Signal):
|
||||
"""Used to represent 'all signals'.
|
||||
|
||||
The All class can be used with connect, disconnect, send, or
|
||||
sendExact to denote that the signal should react to all signals,
|
||||
not just a particular signal.
|
||||
"""
|
||||
|
Reference in New Issue
Block a user