from src.networking.Networking import Networking
from src.utils.util import normalizeName

class Solenoid:
    def __init__(self, name):
        self.name = name

    def __init__(self):
        subclassName = self.__class__.__subclasses__()[0].__name__
        solenoidName = subclassName.split('Solenoid')[0]
        self.name = normalizeName(solenoidName)

    def trigger(self):
        Networking.triggerSolenoid(self.name)