ANNA Suite  2020b
Multipurpose development suite for Telco applications
SureTransport.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_comm_SureTransport_hpp
10 #define anna_comm_SureTransport_hpp
11 
13 #include <anna/core/DataBlock.hpp>
14 
15 #include <anna/comm/Transport.hpp>
17 
18 namespace anna {
19 
20 namespace comm {
21 
22 class Communicator;
23 
29 class SureTransport : public Transport {
30 public:
34  virtual ~SureTransport();
35 
40  static const char* className() { return "anna::comm::SureTransport"; }
41 
47 
48 protected:
49  static const short int headerSize = (sizeof(short int) + sizeof(int));
50  static const short int initTag = 0xaaaa;
52 
56  SureTransport();
57 
58 private:
59  DataBlock a_precodec;
60 
61  int calculeSize(const DataBlock& dataBlock) noexcept(false);
62  const Message* decode(const DataBlock& message) noexcept(false);
63  virtual const DataBlock& code(Message&) noexcept(false);
64 
66 };
67 
68 }
69 }
70 
71 #endif
static TransportFactoryImpl< SureTransport > st_transportFactory
Definition: SureTransport.hpp:51
static const short int initTag
Definition: SureTransport.hpp:50
Definition: Transport.hpp:44
static const short int headerSize
Definition: SureTransport.hpp:49
Definition: Allocator.hpp:19
Definition: Message.hpp:26
Definition: SureTransport.hpp:29
static TransportFactory & getFactory()
Definition: SureTransport.hpp:46
Definition: TransportFactoryImpl.hpp:25
Definition: app.hpp:12
Definition: TransportFactory.hpp:30
static const char * className()
Definition: SureTransport.hpp:40
Definition: DataBlock.hpp:24