summaryrefslogtreecommitdiff
path: root/riff/Shutdown.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'riff/Shutdown.cpp')
-rwxr-xr-xriff/Shutdown.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/riff/Shutdown.cpp b/riff/Shutdown.cpp
new file mode 100755
index 0000000..3dcd1a9
--- /dev/null
+++ b/riff/Shutdown.cpp
@@ -0,0 +1,47 @@
+/*
+ * Shutdown.cpp
+ *
+ * Copyright (C) ST-Ericsson SA 2011
+ * Authors: Srimanta Panda <srimanta.panda@stericsson.com>,
+ * Ola Borgelin <ola.borgelin@stericsson.com>,
+ * Karin Hedlund <karin.hedlund@stericsson.com>,
+ * Markus Andersson <markus.m.andersson@stericsson.com> for ST-Ericsson.
+ * License terms: 3-clause BSD license
+ *
+ */
+
+/*
+ * @addtogroup Commands
+ * @{
+ */
+
+#include "Shutdown.h"
+#include "DUT.h"
+using namespace System;
+
+Shutdown::Shutdown():
+ logger_("ShutDown")
+{
+
+}
+
+int Shutdown::run(DUT* dut)
+{
+ logger_.log(Logger::INFO, "Shutting down device...");
+ int error = System_Shutdown(dut->getLCDContext());
+ if (0 != error)
+ {
+ logger_.log(Logger::ERROR,"LCD ERROR: Device shutdown failed %d", error);
+ return error;
+ }
+
+ logger_.log(Logger::INFO, "Device shutdown finished successfully");
+ return error;
+}
+
+const char * Shutdown::get_command_name()
+{
+ return (char *)"SHUTDOWN";
+}
+
+/* @} */