Commit 08e19243 authored by Nicolas Richard Walter Boeckh's avatar Nicolas Richard Walter Boeckh 💬

Header mapping init.

parent b1ec93cb
......@@ -20,11 +20,13 @@ class DataHandler {
// Index of the packet termination symbol in ASCII.
int index = _data.indexWhere((e) => e == 36);
if (index >= 0 && _data.length > index + 1 && _data[index + 1] == 13 && _data[index + 2] == 10) {
// TODO if starts with `{` then use data header comparison, else use DataPacket constructor
_sortedData.add(_data.getRange(0, index + 1).where((e) => e != 10 && e != 13).toList());
_data.removeRange(0, index + 2);
}
}
@Deprecated("USED FOR DEBUG")
doPrint() {
print("");
_sortedData.map((x) => String.fromCharCodes(x)).forEach(print);
......
......@@ -24,4 +24,8 @@ class DataHeader {
bool isEqual(List<int> that) => ListEquality().equals(_headerData, that);
double _confidence() => _detection / _total;
Map<dynamic, dynamic> getJson() {
return {};
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment