BufferCall.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 #include <etk/types.hpp>
8 #include <enet/WebSocket.hpp>
9 #include <zeus/ParamType.hpp>
10 #include <zeus/BufferParameter.hpp>
11 
12 namespace zeus {
13 
14  class BufferCall :
15  public BufferParameter {
16  friend class zeus::Buffer;
17  protected:
18  std::string m_callName;
19  protected:
24  m_header.flags = ZEUS_BUFFER_FLAG_FINISH + uint8_t(zeus::Buffer::typeMessage::call);
25  };
26  void composeWith(const uint8_t* _buffer, uint32_t _lenght) override;
27  void appendBufferData(ememory::SharedPtr<zeus::BufferData> _obj) override;
28  bool writeOn(enet::WebSocket& _interface) override;
29  void generateDisplay(std::ostream& _os) const override;
30  public:
36  public:
37  enum zeus::Buffer::typeMessage getType() const override {
39  }
44  const std::string& getCall() const;
49  void setCall(const std::string& _value);
50 
51  };
52 }
bool writeOn(enet::WebSocket &_interface) override
Write the buffer on a specific interface.
headerBin m_header
header of the protocol
Definition: Buffer.hpp:134
BufferCall()
basic constructor (hidden to force the use of ememory::SharedPtr) zeus::BufferCall::create ...
Definition: BufferCall.hpp:23
Definition: BufferCall.hpp:14
void composeWith(const uint8_t *_buffer, uint32_t _lenght) override
When receive new data form websocket, it might be added by this input (set all the frame ...
Protocol buffer to transmit datas.
Definition: Buffer.hpp:110
const std::string & getCall() const
get the call value of the buffer
Remote call on a service ID.
void setCall(const std::string &_value)
Set the call value of the buffer.
Main zeus library namespace.
Definition: AbstractFunction.hpp:15
enum zeus::Buffer::typeMessage getType() const override
Get the type of the buffer.
Definition: BufferCall.hpp:37
static ememory::SharedPtr< zeus::BufferCall > create()
Create a shared pointer on the BufferCall.
Definition: BufferParameter.hpp:13
typeMessage
Type of the massage send or receive.
Definition: Buffer.hpp:216