modify Query\PinState constructor.
implement digtalWirte() method.