copied everything over from 2012 and removed all of the actual robot code except the drivetrain stuff
git-svn-id: https://robotics.mvla.net/svn/frc971/2013/trunk/src@4078 f308d9b7-e957-4cde-b6ac-9a88185e7312
diff --git a/aos/crio/queue-tmpl.h b/aos/crio/queue-tmpl.h
new file mode 100644
index 0000000..94bc100
--- /dev/null
+++ b/aos/crio/queue-tmpl.h
@@ -0,0 +1,57 @@
+namespace aos {
+
+// The easiest way to hack this together is to have the scoped msg pointer not
+// manage the pointer, since it is a pointer to the only msg in the queue.
+template <class T>
+bool ScopedMessagePtr<T>::Send() {
+ msg_->SetTimeToNow();
+ reset();
+ return true;
+}
+
+template <class T>
+bool ScopedMessagePtr<T>::SendBlocking() {
+ msg_->SetTimeToNow();
+ reset();
+ return true;
+}
+
+template <class T>
+void ScopedMessagePtr<T>::reset(T *msg) {
+ msg_ = msg;
+}
+
+template <class T>
+void Queue<T>::Init() {}
+
+template <class T>
+bool Queue<T>::FetchNext() {
+ Init();
+ return true;
+}
+
+template <class T>
+bool Queue<T>::FetchNextBlocking() {
+ Init();
+ return true;
+}
+
+template <class T>
+bool Queue<T>::FetchLatest() {
+ Init();
+ return true;
+}
+
+template <class T>
+ScopedMessagePtr<T> Queue<T>::MakeMessage() {
+ Init();
+ return ScopedMessagePtr<T>(&msg_);
+}
+
+template <class T>
+aos::MessageBuilder<T> Queue<T>::MakeWithBuilder() {
+ Init();
+ return aos::MessageBuilder<T>(&msg_);
+}
+
+} // namespace aos