SharedObjectsUpdaterInputOutputClass.php
1.13 KB
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
<?php
/**
* @class SharedObjectsUpdaterInputOutputClass
* @brief Class that's implement an InputOutputInterface for AMDA Shared Objects updater.
* @details
*/
class SharedObjectsUpdaterInputOutputClass implements InputOutputInterface
{
protected $inputOutput = null;
/*
* @brief Constructor
*/
function __construct()
{
}
/*
* @brief translate input data from AMDA Shared Objects updater to AMDA_Integration module
*/
public function getInputData($input,$function,$requestId = "")
{
switch ($function)
{
case FunctionTypeEnumClass::TTCONVERT :
$this->inputOutput = new SharedObjectsUpdaterInputOutputTTClass();
break;
default :
throw new Exception('Request type '.$function.' not implemented for this client.');
}
return $this->inputOutput->getInputData($input,$function,$requestId);
}
/*
* @brief translate output data from AMDA_Integration module to AMDA IHM
*/
public function getOutput($data)
{
if (!isset($this->inputOutput))
return array("success" => false, "message" => "Input Output Interface not initialized for this request");
return $this->inputOutput->getOutput($data);
}
}
?>