My favorites
▼
|
Sign in
tinkercode
Miscellaneous Code Snippets for AVR programming
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
automation-framework
/
common
/
commandFilter.h
‹r119
r143
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
38
39
40
41
42
43
44
///////////////////////////////////////////////////////////////////////////////
// protocol.c - Home automation library
//
// Copyright (C) 2009 Jochen Toppe <jochen@jtoee.com>. All right reserved.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
///////////////////////////////////////////////////////////////////////////////
#ifndef COMMANDPROCESSOR_H_INCLUDED
#define COMMANDPROCESSOR_H_INCLUDED
#include "common.h"
#include "protocol.h"
//
// handle the command, does basic request id checking. if the device in locked
// mode this will only let through an UNLOCK command. Calls doHandleCommand otherwise.
//
void filterCommand(struct Command *aCmd);
// TODO: replace by function pointer
//
// Set this function pointer to your specific firmware command handler.
// ** If this is not set, no commands can be handled! **
//
extern void (*_cmd_handler)(struct Command *);
// set the pre send hook
#define setCommandHandler(fx) _cmd_handler=fx
#endif // COMMANDPROCESSOR_H_INCLUDED
Show details
Hide details
Change log
r126
by jochen.toppe on Jan 7, 2010
Diff
refactor
Go to:
...framework/common/commandFilter.c
...framework/common/commandFilter.h
...mework/common/commandProcessor.c
...mework/common/commandProcessor.h
...-framework/light_sensor/Makefile
...on-framework/light_sensor/main.c
...framework/light_sensor2/Makefile
...n-framework/light_sensor2/main.c
...mation-framework/master/Makefile
...work/master/test_serial_master.c
...ramework/relay_receiver/Makefile
...-framework/relay_receiver/main.c
...-framework/test/embedded_tests.c
...automation-framework/test/test.c
...ation-framework/test/unit_test.h
Project members,
sign in
to write a code review
Older revisions
r95
by jochen.toppe on Dec 25, 2009
Diff
light sensor - tested
r93
by jochen.toppe on Dec 25, 2009
Diff
[No log message]
r81
by jochen.toppe on Dec 14, 2009
Diff
[No log message]
All revisions of this file
File info
Size: 1698 bytes, 44 lines
View raw file
Powered by
Google Project Hosting