PX4 Firmware
PX4 Autopilot Software http://px4.io
px4muorb.hpp
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Copyright (C) 2015 Mark Charlebois. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in
13  * the documentation and/or other materials provided with the
14  * distribution.
15  * 3. Neither the name PX4 nor the names of its contributors may be
16  * used to endorse or promote products derived from this software
17  * without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  ****************************************************************************/
33 #pragma once
34 
35 #include <stdint.h>
36 
37 extern "C" {
38 
40 
41  int px4muorb_set_absolute_time_offset(int32_t time_diff_us) __EXPORT;
42 
43  int px4muorb_get_absolute_time(uint64_t *time_us) __EXPORT;
44 
45  int px4muorb_param_update_to_shmem(uint32_t param, const uint8_t *value, int data_len_in_bytes) __EXPORT;
46 
47  int px4muorb_param_update_index_from_shmem(unsigned char *data, int data_len_in_bytes) __EXPORT;
48 
49  int px4muorb_param_update_value_from_shmem(uint32_t param, const uint8_t *value, int data_len_in_bytes) __EXPORT;
50 
51  int px4muorb_topic_advertised(const char *name) __EXPORT;
52 
53  int px4muorb_topic_unadvertised(const char *name) __EXPORT;
54 
55  int px4muorb_add_subscriber(const char *name) __EXPORT;
56 
57  int px4muorb_remove_subscriber(const char *name) __EXPORT;
58 
59  int px4muorb_send_topic_data(const char *name, const uint8_t *data, int data_len_in_bytes) __EXPORT;
60 
61  int px4muorb_is_subscriber_present(const char *topic_name, int *status) __EXPORT;
62 
63  int px4muorb_receive_msg(int *msg_type, char *topic_name, int topic_name_len, uint8_t *data, int data_len_in_bytes,
64  int *bytes_returned) __EXPORT;
65 
66  int px4muorb_receive_bulk_data(uint8_t *_BulkTransferBuffer, int max_size_in_bytes,
67  int *length_in_bytes, int *topic_count) __EXPORT;
68 
69  int px4muorb_unblock_recieve_msg(void) __EXPORT;
70 
71 }
int px4muorb_orb_initialize() __EXPORT
Definition: px4muorb.cpp:51
static struct vehicle_status_s status
Definition: Commander.cpp:138
int px4muorb_param_update_value_from_shmem(uint32_t param, const uint8_t *value, int data_len_in_bytes) __EXPORT
Definition: px4muorb.cpp:129
int px4muorb_add_subscriber(const char *name) __EXPORT
Definition: px4muorb.cpp:190
Definition: I2C.hpp:51
int px4muorb_receive_bulk_data(uint8_t *_BulkTransferBuffer, int max_size_in_bytes, int *length_in_bytes, int *topic_count) __EXPORT
Definition: px4muorb.cpp:275
int px4muorb_is_subscriber_present(const char *topic_name, int *status) __EXPORT
Definition: px4muorb.cpp:246
int px4muorb_set_absolute_time_offset(int32_t time_diff_us) __EXPORT
Definition: px4muorb.cpp:71
int px4muorb_topic_unadvertised(const char *name) __EXPORT
Definition: px4muorb.cpp:173
int px4muorb_get_absolute_time(uint64_t *time_us) __EXPORT
Definition: px4muorb.cpp:76
int px4muorb_send_topic_data(const char *name, const uint8_t *data, int data_len_in_bytes) __EXPORT
Definition: px4muorb.cpp:228
uint8_t * data
Definition: dataman.cpp:149
int px4muorb_unblock_recieve_msg(void) __EXPORT
Definition: px4muorb.cpp:290
const char * name
Definition: tests_main.c:58
static uint8_t * _BulkTransferBuffer
int px4muorb_receive_msg(int *msg_type, char *topic_name, int topic_name_len, uint8_t *data, int data_len_in_bytes, int *bytes_returned) __EXPORT
Definition: px4muorb.cpp:260
int px4muorb_remove_subscriber(const char *name) __EXPORT
Definition: px4muorb.cpp:211
int px4muorb_topic_advertised(const char *name) __EXPORT
Definition: px4muorb.cpp:156
int px4muorb_param_update_index_from_shmem(unsigned char *data, int data_len_in_bytes) __EXPORT
Definition: px4muorb.cpp:109
int px4muorb_param_update_to_shmem(uint32_t param, const uint8_t *value, int data_len_in_bytes) __EXPORT
Definition: px4muorb.cpp:83