mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ion] Add a host command-line utility to filter valid events
Change-Id: Iaaa26ebf079152592a973c1f4658caa00f3f0651
This commit is contained in:
@@ -4,12 +4,12 @@ ifdef GIT
|
||||
PATCH_LEVEL = `git rev-parse HEAD`
|
||||
endif
|
||||
|
||||
|
||||
|
||||
SFLAGS += -Iion/include -DKD_CONFIG_H=1
|
||||
ion/src/shared/software_version.o: SFLAGS += -DPATCH_LEVEL=$(PATCH_LEVEL) -DVERSION=$(VERSION)
|
||||
include ion/src/$(PLATFORM)/Makefile
|
||||
|
||||
include ion/src/shared/tools/Makefile
|
||||
|
||||
objs += $(addprefix ion/src/shared/, \
|
||||
events.o \
|
||||
software_version.o \
|
||||
|
||||
5
ion/src/shared/tools/Makefile
Normal file
5
ion/src/shared/tools/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
ion/src/shared/tools/event_%: ion/src/shared/tools/event_%.cpp ion/src/shared/events.cpp
|
||||
@echo "HOSTCXX $@"
|
||||
@$(HOSTCXX) -std=c++11 -Iion/include $^ -o $@
|
||||
|
||||
products += $(addprefix ion/src/shared/tools/, event_filter event_generator)
|
||||
12
ion/src/shared/tools/event_filter.cpp
Normal file
12
ion/src/shared/tools/event_filter.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <iostream>
|
||||
#include <ion/events.h>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
char c;
|
||||
while (std::cin.get(c)) {
|
||||
Ion::Events::Event e(c);
|
||||
if (e.isValid()) {
|
||||
std::cout.put(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user