/* 
 * File:   cKlinkFrame.h
 * Author: john
 *
 * Created on 04 April 2011, 2:47 PM
 */

#ifndef CKLINKFRAME_H
#define	CKLINKFRAME_H

#include <stdint.h>
#include <klog.h>
#include <cKlinkDataBuffer.h>
#include <cKlinkDebug.h>

class cKlinkFrame : public cKlog
{
public:
    static const int HEADER_SIZE;
    static const int BROADCAST_ADDRESS;
    static const int MASTER_ADDRESS;
    enum eFrameType
    {
       DISCOVERY_FRAME,
       ACK_PDU_FRAME,
       STREAM_FRAME,
    };
    cKlinkFrame();
    virtual ~cKlinkFrame();
    virtual cKlinkDataBuffer & getData() = 0;
    void setDestAddress(uint8_t);
    uint8_t getDestAddress();
    void setSrcAddress(uint8_t);
    uint8_t getSrcAddress();
    void setFrameType(eFrameType);
    eFrameType getFrameType();
    static cKlinkFrame * process(cKlinkDataBuffer &);
    void replyReverse();
private:

};

#endif	/* CKLINKFRAME_H */

