private void handleEvents(byte[] resp) {

        if(resp == null || resp.length == 0) {
            return;
        }

        RS232Packet respPacket = socket.parseResponse(resp);

        creditAction = respPacket.getCreditAction();
        rawFirmwareRevision = respPacket.getFirmwareRevision();
        rawAcceptorModel = respPacket.getAcceptorModel();


        PTalkEvent e;
        for (Events type : respPacket.getInterpretedEvents()) {

            // Is this an event that requires extra data?
            switch (type) {

                case Credit:
                    e = new CreditEvent(
                            this,
                            Utilities.bytesToString(resp),
                            respPacket.getBillName());
                    break;

                case Escrowed:
                    e = new EscrowedEvent(
                            this,
                            Utilities.bytesToString(resp),
                            respPacket.getBillName());
                    break;

                default:
                    e = new PTalkEvent(this, type, respPacket.getByteString());

            }

            // Notify any listeners that we have data
            fireChangeEvent(e);
        }
    }