LARS
LARS (Light Augmented Reality System) is an open-source framework for light-based interaction and real-time tracking in multi-robot experiments. Inspired by ARK, LARS extends the augmented reality paradigm to robotic collectives by projecting dynamic visual cues and environments onto the arena, enabling new experimental possibilities for collective robotics research, education, and outreach. LARS features integrated tracking, light projection, and modular experiment control with a user-friendly Qt GUI.
Loading...
Searching...
No Matches
intelhex.h
1/* Routines for reading/writing Intel INHX8M and INHX32 files
2
3 Copyright 2002 Brandon Fosdick (BSD License)
4*/
5
6#ifndef INTELHEXH
7#define INTELHEXH
8
9#include <iostream>
10#include <map>
11#include <vector>
12#include <stdint.h>
13#include <unistd.h>
14
15namespace intelhex
16{
17
18 #define HEX_FORMAT_INHX8M 0x01
19 #define HEX_FORMAT_INHX32 0x02
20
21 struct hex_data;
22 typedef hex_data container;
23 typedef uint32_t address_type;
24 typedef uint8_t value_type;
25
26 //The data set that results from parsing a hex file
27 struct hex_data
28 {
29 //Each line of the hex file generates a block of memory at a particular address
30 typedef std::vector<value_type> data_container; //Element container
31 typedef std::map<address_type, data_container> container; //List of data blocks
32
33 typedef container::iterator iterator;
34 typedef container::reverse_iterator reverse_iterator;
35 typedef data_container::size_type size_type;
36 private:
37 value_type _fill; // Value returned for unset addresses
38 char format; //Format of the parsed file (necessary?)
39 bool segment_addr_rec; // Uses/Has a segment address record
40 bool linear_addr_rec; // Uses/Has a linear address record
41 container blocks; // List of data blocks
42
43 public:
44 hex_data() : _fill(0), segment_addr_rec(false), linear_addr_rec(false) {}
45 hex_data(const std::string &s) : _fill(0), segment_addr_rec(false), linear_addr_rec(false)
46 {
47 load(s);
48 }
49 iterator begin() { return blocks.begin(); }
50 iterator end() { return blocks.end(); }
51
52 void compact(); // Merge adjacent blocks
53 void clear(); //Delete everything
54 void erase(address_type); // Erase a single element
55 void erase(address_type first, address_type last); // Erase [first, last]
56 value_type fill() { return _fill; }
57 void fill(value_type f) { _fill = f; }
58 size_type size();
59 size_type size_below_addr(address_type);
60 size_type size_in_range(address_type, address_type); //number of words in [lo, hi)
61 address_type max_addr_below(address_type);
62
63 address_type min_address() const; // Lowest address
64 address_type max_address() const; // Highest address
65
66 bool is_set(address_type);
67
68 value_type& operator[](address_type); //Array access operator
69 value_type get(address_type); // Return the value at address
70 void set(address_type, value_type); // Set the value at address
71
72 void load(const std::string&); // Load from a file
73 void read(std::istream &); // Read data from an input stream
74 void write(const char *); //Save hex data to a hex file
75 void write(std::ostream &); //Write all data to an output stream
76 void tidy(size_type length); // Make things pretty
77 };
78
79 bool compare(hex_data&, hex_data&, value_type, address_type, address_type);
80}
81#endif
Definition intelhex.h:28