ROSBuzz_MISTLab/include/buzz_utility.h

83 lines
1.8 KiB
C
Raw Normal View History

#pragma once
#include <stdio.h>
#include "buzz_utility.h"
#include "buzzuav_closures.h"
#include "buzz_update.h"
#include <buzz/buzzdebug.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <iostream>
#include <stdint.h>
#include <map>
using namespace std;
namespace buzz_utility{
struct pos_struct
{
double x,y,z;
pos_struct(double x,double y,double z):x(x),y(y),z(z){};
pos_struct(){}
};
2017-06-26 15:09:33 -03:00
typedef struct pos_struct Pos_struct;
struct rb_struct
{
double r,b,latitude,longitude,altitude;
rb_struct(double la, double lo, double al, double r,double b):latitude(la),longitude(lo),altitude(al),r(r),b(b){};
2017-06-26 15:09:33 -03:00
rb_struct(){}
};
typedef struct rb_struct RB_struct;
struct neiStatus
{
uint gps_strenght = 0;
uint batt_lvl = 0;
uint xbee = 0;
uint flight_status = 0;
}; typedef struct neiStatus neighbors_status ;
uint16_t* u64_cvt_u16(uint64_t u64);
int buzz_listen(const char* type,
int msg_size);
2017-05-07 00:40:50 -03:00
void add_user(int id, double latitude, double longitude, float altitude);
void update_users();
int make_table(buzzobj_t* t);
int buzzusers_add(int id, double latitude, double longitude, double altitude);
int buzzusers_reset();
int compute_users_rb();
2017-05-15 17:29:33 -03:00
int create_stig_tables();
void in_msg_append(uint64_t* payload);
2017-04-24 15:20:59 -03:00
uint64_t* obt_out_msg();
void update_sensors();
int buzz_script_set(const char* bo_filename,
const char* bdbg_filename, int robot_id);
int buzz_update_set(uint8_t* UP_BO_BUF, const char* bdbg_filename,size_t bcode_size);
int buzz_update_init_test(uint8_t* UP_BO_BUF, const char* bdbg_filename,size_t bcode_size);
void buzz_script_step();
void buzz_script_destroy();
int buzz_script_done();
int update_step_test();
2017-04-20 17:07:36 -03:00
int get_robotid();
buzzvm_t get_vm();
void set_robot_var(int ROBOTS);
2017-08-30 22:02:37 -03:00
int get_inmsg_size();
}