Initial commit
[remote/remote-mci.git] / protocols / motecontrol / MsgRequest.h
blob60b88f35e081428ecdf62359b6055f3a8384332b
1 #ifndef MSGREQUEST_H_
2 #define MSGREQUEST_H_
3 #include "tcputil.h"
4 #include "BaseMsg.h"
5 #include "MsgPayload.h"
7 namespace remote { namespace protocols { namespace motecontrol {
9 enum MOTECOMMAND
11 MOTECOMMAND_PROGRAM,
12 MOTECOMMAND_STATUS,
13 MOTECOMMAND_RESET,
14 MOTECOMMAND_STOP,
15 MOTECOMMAND_START,
16 MOTECOMMAND_CANCELPROGRAMMING
19 class MsgRequest : public BaseMsg
21 public:
22 MsgRequest(uint8_t command);
23 MsgRequest(uint8_t*& buffer, uint32_t& buflen);
25 ~MsgRequest();
26 void operator = (const MsgRequest& o);
28 uint32_t getLength();
29 uint8_t* write(uint8_t* buffer, uint32_t& buflen);
30 uint8_t* read(uint8_t* buffer, uint32_t& buflen);
31 void print(_IO_FILE* s);
33 uint8_t getCommand();
34 MsgPayload& getFlashImage();
35 protected:
36 uint8_t command;
37 MsgPayload flashImage;
40 }}}
41 #endif /*MSGREQUEST_H_*/