From 9f32aae8dd7547e05898ea02ddd629cdb44ade34 Mon Sep 17 00:00:00 2001
From: Jake Drahos <j@kedrahos.com>
Date: Thu, 10 Nov 2016 12:52:18 -0600
Subject: [PATCH] Added backendWrite

---
 groundStation/src/frontend/frontend_common.c | 5 +++++
 groundStation/src/frontend/frontend_common.h | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/groundStation/src/frontend/frontend_common.c b/groundStation/src/frontend/frontend_common.c
index ad9b90c50..7b9f29dfd 100644
--- a/groundStation/src/frontend/frontend_common.c
+++ b/groundStation/src/frontend/frontend_common.c
@@ -83,3 +83,8 @@ char * ucart_backendGetline(struct backend_conn *conn)
 	getline(&conn->buf, &conn->len, conn->socket);
 	return conn->buf;
 }
+
+size_t ucart_backendWrite(struct backend_conn *conn, const char * line)
+{
+	return fputs(line, conn->socket);
+}
diff --git a/groundStation/src/frontend/frontend_common.h b/groundStation/src/frontend/frontend_common.h
index 28405f194..dd2eb7e3b 100644
--- a/groundStation/src/frontend/frontend_common.h
+++ b/groundStation/src/frontend/frontend_common.h
@@ -15,4 +15,7 @@ void ucart_backendDisconnect(struct backend_conn * conn);
  */
 char * ucart_backendGetline(struct backend_conn * conn);
 
+/* Write a line to the backend */
+void ucart_backendWrite(struct backend_conn * backend, const char * line);
+
 #endif
-- 
GitLab