summaryrefslogtreecommitdiff
path: root/riff/Shutdown.cpp
blob: 3dcd1a95407db60b8ad255ca1b9135687ab711e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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";
}

/* @} */