/* 
 * File:   cKlink.h
 * Author: john
 *
 * Created on 04 April 2011, 10:21 AM
 */

#ifndef CKLINK_H
#define	CKLINK_H

#include <klog.h>

#include <cKlinkBus.h>
#include <cKlinkBusInterface.h>
#include <cKlinkEnumeratedList.h>
#include <cKlinkDeviceFactory.h>
#include <cKlinkDebug.h>

/*
 * These parameters configure the buffer sizes and timeouts for the klink library
 */

#define KLINK_MAX_PDU_SIZE 512

class cKlink : public cKlog 
{
public:
    static cKlinkBus & createBus(cKlinkBusInterface &,bool master,cKlinkDeviceFactory * f = NULL,cKlinkDeviceListener * dl = NULL,int num_discover_cycles=1);
    static void removeBus(cKlinkBus &);
    static void runAll();
private:
    static cKlink * mInstance;
    cKlink();
    virtual ~cKlink();
    static cKlink & get();
    cKlinkEnumeratedList<cKlinkBus> mBusList;
};

#endif	/* CKLINK_H */

