Newer
Older
#include "BTPLayer.hh"
void BTPLayer::sendMsg(LibItsBtp__TypesAndValues::BtpPacket& p, Params& params){
_codec.encode(p, data);
sendData(data, params);
LibItsBtp__TypesAndValues::BtpPacket p;
_codec.decode(data, p);
/*if(p.payload().is_present()) {
toAllUpperLayers(p.payload().rawPayload(), info);
}*/
}
class BTPFactory : public LayerFactory {
static BTPFactory _f;
public:
BTPFactory();
virtual Layer * createLayer(const std::string & type, const std::string & param);
};
LayerStackBuilder::RegisterLayerFactory("BTP", this);
Layer * BTPFactory::createLayer(const std::string & p_type, const std::string & param){
return new BTPLayer(p_type);