client-cpp  0.10.0
PingRequest.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2016 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef PINGREQUEST_HPP_
18 #define PINGREQUEST_HPP_
19 
22 
23 namespace kaa
24 {
25 
27 {
28 public:
29  PingRequest() : message_(2)
30  {
31  char header[2];
33  std::copy(reinterpret_cast<const std::uint8_t *>(header),
34  reinterpret_cast<const std::uint8_t *>(header + 2),
35  message_.begin());
36  }
38 
39  const std::vector<std::uint8_t>& getRawMessage() const { return message_; }
40 
41 private:
42  std::vector<std::uint8_t> message_;
43 
44 };
45 
46 }
47 
48 
49 #endif /* PINGREQUEST_HPP_ */
const std::vector< std::uint8_t > & getRawMessage() const
Definition: PingRequest.hpp:39
static std::uint8_t createBasicHeader(std::uint8_t messageType, std::uint32_t length, char *message)