-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.h
More file actions
37 lines (31 loc) · 943 Bytes
/
command.h
File metadata and controls
37 lines (31 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// (C) Copyright 2009-2011 Vit Kasal
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#pragma
#include "fixed_command.h"
namespace si
{
template<boost::uint8_t command_tt
, typename parameters_tt = boost::deque<>
, bool control_sequence = false
> struct command
: public fixed_command<command_tt, parameters_tt, control_sequence>
, public command_interface
{
typedef fixed_command<command_tt, parameters_tt> base_command;
command():
command_id(command_base::command_code)
{
}
virtual id_type get_id(protocols::id<>::value_type protocol = protocols::id<>::value)
{
return command_id;
}
virtual void set_id(id_type new_command_code, protocols::id<>::value_type protocol = protocols::id<>::value)
{
command_id = new_command_code;
}
boost::uint8_t command_id;
};
}//namespace si