aggregator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Kubos Corporation
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 
24 #ifndef AGGREGATOR_H
25 #define AGGREGATOR_H
26 
27 #include <csp/arch/csp_thread.h>
28 #include <telemetry/telemetry.h>
29 
34 CSP_DEFINE_TASK(aggregator);
35 
39 #define INIT_AGGREGATOR_THREAD \
40 { \
41  csp_thread_handle_t agg_handle; \
42  csp_thread_create(aggregator, "AGGREGATOR", 2048, NULL, 0, &agg_handle); \
43 }
44 
50 void user_aggregator(void);
51 
55 void aggregator_submit(telemetry_source, uint16_t data);
56 
57 #endif
58 
59 /* @} */
void user_aggregator(void)
Function stub for user-defined telemetry aggregator.
void aggregator_submit(telemetry_source, uint16_t data)
Convenience wrapper function for telemetry submission.
CSP_DEFINE_TASK(aggregator)
Thread for aggregating telemetry data.